[website] Re: wine site: Translate sendind_patches to Spanish in web.site.git
Ángel Guzmán Maeso
shakaran at gmail.com
Fri May 30 13:54:01 CDT 2008
Jeremy Newman wrote:
I figured as much. I just needed a template to use as a test. I knew you'd
end up fixing the poor translation. I had no intention to use it on more
templates.
Okay, then nothing happens. All right.
The templates files are well. Sorry for my fail in quote function. I thought
a little more and I saw three alternatives but to make the code more quickly
and efficiently:
# Alternative one (my prefer, but not is valid, because cut \n and the
next character)
$quotes = split("\n.",$GLOBALS[html]->template('base','quotes')); # We
use the powerful slice of regex
return $quotes[array_rand($quotes)]; # and then we use array_rand() more
effectively
# Alternative two (better)
$quotes = explode("\n",$GLOBALS[html]->template('base','quotes')); # If
we don't use regex then explode() is more effective
return $quotes[mt_rand(0,(sizeof($quotes)-2))]; # and also use mt_rand()
and sizeof which is faster
# Alternative three (less better)
$quotes = explode("\n",$GLOBALS[html]->template('base','quotes')); # If
we don't use regex then explode() is more effective
$num = sizeof($quotes)-2; # We use a temp variable + sizeof() +
array_random()
return $quotes[array_rand($num)];
You decide Jeremy.
And other small improve, show path of config file not found
diff --git a/include/config.php b/include/config.php
index a5f1fe2..6016cc4 100644
--- a/include/config.php
+++ b/include/config.php
@@ -22,7 +22,7 @@ class config
// exit if config not found
if (!file_exists($path))
{
- echo 'config file not found!';
+ echo 'config file '.$path.' not found!';
exit();
}
i18n people sometimes do a search and replace to turn all o's into o
> plus o umlaut,
> all n's into n plus n tilde, etc. The result is longer than the
> original and uses
> funny characters, and is still understandable by the person doing the
> internationalization,
> but can't be mistaken for final text.
> - Dan
I try to do the translations as well as possible and without which vary the
original meaning.
Soon, more translations.
<http://www.apogeus.es>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20080530/378be978/attachment.htm
More information about the wine-devel
mailing list