aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-22 06:50:47 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-22 06:50:47 +0100
commit767b4f30f7ee114b1cfd66e68fa959ac033b5667 (patch)
tree6df1045c07a3297d6e43550e37dda43d0ac925d2 /util
parent8fbde780b37e3d5eeb2ee672a3474b3701eb9645 (diff)
parentee11a74d0b7cff5061a4d498f8ecd15e55b91b07 (diff)
downloadvolse-hubzilla-767b4f30f7ee114b1cfd66e68fa959ac033b5667.tar.gz
volse-hubzilla-767b4f30f7ee114b1cfd66e68fa959ac033b5667.tar.bz2
volse-hubzilla-767b4f30f7ee114b1cfd66e68fa959ac033b5667.zip
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'util')
-rw-r--r--util/.htaccess5
-rw-r--r--util/README19
-rw-r--r--util/string_translator.php2
-rw-r--r--util/strings.php76
-rw-r--r--util/typo.php3
5 files changed, 71 insertions, 34 deletions
diff --git a/util/.htaccess b/util/.htaccess
new file mode 100644
index 000000000..b311c14c2
--- /dev/null
+++ b/util/.htaccess
@@ -0,0 +1,5 @@
+Options -Indexes
+
+# Remove the following line or modify it to run the string translator utility
+Deny from all
+
diff --git a/util/README b/util/README
index c6bc032a5..cb2fd9b55 100644
--- a/util/README
+++ b/util/README
@@ -49,8 +49,8 @@ Placeholders
Do not translate placeholders in strings! Things like %s, %d, %1$s and $somename
are used to add dynamic content to the string.
-%s rappresent a dynamic string, like in "Welcome to %s"
-%d rappresent a dynamic number, like in "%d new messages"
+%s represents a dynamic string, like in "Welcome to %s"
+%d represents a dynamic number, like in "%d new messages"
$somename is a variable like in php
In %1$s %2$s, the numbers are the position index of multiple dynamic content.
You could swap position in string of indexed placeholders.
@@ -78,11 +78,11 @@ More info at http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html
Xgettext and .po workflow
-1. Run utils/run_xgettext.sh script (on *unix sistems, with GNU xgettext installed)
+1. Run util/run_xgettext.sh script (on *unix sistems, with GNU xgettext installed)
This script runs xgettext on source tree, extracting strings from t() and tt()
- functions, and creates a utils/messages.po file.
-2. copy utils/messages.po to views/<langauage>/messages.po
-3. open views/<langauage>/messages.po with a text editor and fill in infos in
+ functions, and creates a util/messages.po file.
+2. copy util/messages.po to view/<langauage>/messages.po
+3. open view/<langauage>/messages.po with a text editor and fill in infos in
"Last-Translator: FULL NAME <EMAIL@ADDRESS>"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
@@ -102,19 +102,20 @@ Xgettext and .po workflow
of the many .po editors out there, like QtLinguist
5. run
- $ php utils/po2php.php views/<language>/messages.po
+ $ php util/po2php.php view/<language>/messages.po
to create the strings.php file
When strings are added or modified in source, you could run
- $ utils/run_xgettext.sh views/<language>/messages.po
+ $ util/run_xgettext.sh view/<language>/messages.po
to extraxt strings from source files and join them with the existing .po file:
new strings are added, the existing are not overwritten.
If you already translated Friendika using strings.php, you could import your old
translation to messages.po. Run:
-$ php utils/php2po.php views/<language>/strings.php
+$ php util/php2po.php view/<language>/strings.php
+You may also use the util/string_translator.php web interface to translate the string file, but it is disabled for website security reasons. The web server will need write permission to your language directories and the "Deny ..." line in util/.htaccess will need to be modified or commented to use the utility.
diff --git a/util/string_translator.php b/util/string_translator.php
index 4112d9506..a718130d8 100644
--- a/util/string_translator.php
+++ b/util/string_translator.php
@@ -99,7 +99,7 @@ if (isset($_GET['lang'])){
$n2 = count($strings[$lang]);
echo "<pre>";
- echo "Tranlsate en to $lang<br>";
+ echo "Translate en to $lang<br>";
//echo "Translated $n2 over $n1 strings<br>";
echo "</pre><hr/>";
diff --git a/util/strings.php b/util/strings.php
index 395901b06..907bfb6df 100644
--- a/util/strings.php
+++ b/util/strings.php
@@ -22,16 +22,14 @@ $a->strings['prev'] = 'prev';
$a->strings['first'] = 'first';
$a->strings['last'] = 'last';
$a->strings['next'] = 'next';
-$a->strings[' likes this.'] = ' likes this.';
-$a->strings[' doesn\'t like this.'] = ' doesn\'t like this.';
-$a->strings['people'] = 'people';
-$a->strings['like this.'] = 'like this.';
-$a->strings['don\'t like this.'] = 'don\'t like this.';
+$a->strings['%s likes this.'] = '%s likes this.';
+$a->strings['%s doesn\'t like this.'] = '%s doesn\'t like this.';
+$a->strings['<span %1$s>%2$d people</span> like this.'] = '<span %1$s>%2$d people</span> like this.';
+$a->strings['<span %1$s>%2$d people</span> don\'t like this.'] = '<span %1$s>%2$d people</span> don\'t like this.';
$a->strings['and'] = 'and';
-$a->strings[', and '] = ', and ';
-$a->strings[' other people'] = ' other people';
-$a->strings[' like this.'] = ' like this.';
-$a->strings[' don\'t like this.'] = ' don\'t like this.';
+$a->strings[', and %d other people'] = ', and %d other people';
+$a->strings['%s like this.'] = '%s like this.';
+$a->strings['%s don\'t like this.'] = '%s don\'t like this.';
$a->strings['No contacts'] = 'No contacts';
$a->strings['Contacts'] = 'Contacts';
$a->strings['View Contacts'] = 'View Contacts';
@@ -62,6 +60,7 @@ $a->strings['September'] = 'September';
$a->strings['October'] = 'October';
$a->strings['November'] = 'November';
$a->strings['December'] = 'December';
+$a->strings['Birthday Reminders'] = 'Birthday Reminders';
$a->strings['Birthdays this week:'] = 'Birthdays this week:';
$a->strings["\x28Adjusted for local time\x29"] = "\x28Adjusted for local time\x29";
$a->strings['[today]'] = '[today]';
@@ -88,6 +87,8 @@ $a->strings['Contact not found.'] = 'Contact not found.';
$a->strings['Mutual Friendship'] = 'Mutual Friendship';
$a->strings['is a fan of yours'] = 'is a fan of yours';
$a->strings['you are a fan of'] = 'you are a fan of';
+$a->strings['Privacy Unavailable'] = 'Privacy Unavailable';
+$a->strings['Private communications are not available for this contact.'] = 'Private communications are not available for this contact.';
$a->strings['Never'] = 'Never';
$a->strings["\x28Update was successful\x29"] = "\x28Update was successful\x29";
$a->strings["\x28Update was not successful\x29"] = "\x28Update was not successful\x29";
@@ -126,11 +127,10 @@ $a->strings['Contact record was not found for you on our site.'] = 'Contact reco
$a->strings['The ID provided by your system is a duplicate on our system. It should work if you try again.'] = 'The ID provided by your system is a duplicate on our system. It should work if you try again.';
$a->strings['Unable to set your contact credentials on our system.'] = 'Unable to set your contact credentials on our system.';
$a->strings['Unable to update your contact profile details on our system'] = 'Unable to update your contact profile details on our system';
+$a->strings["Connection accepted at %s"] = "Connection accepted at %s";
$a->strings['Administrator'] = 'Administrator';
$a->strings['noreply'] = 'noreply';
$a->strings["%s commented on an item at %s"] = "%s commented on an item at %s";
-$a->strings["From: Administrator@"] = "From: Administrator@";
-$a->strings['%s welcomes %s'] = '%s welcomes %s';
$a->strings["This introduction has already been accepted."] = "This introduction has already been accepted.";
$a->strings['Profile location is not valid or does not contain profile information.'] = 'Profile location is not valid or does not contain profile information.';
$a->strings['Warning: profile location has no identifiable owner name.'] = 'Warning: profile location has no identifiable owner name.';
@@ -175,8 +175,10 @@ $a->strings['Item not found.'] = 'Item not found.';
$a->strings['Private Message'] = 'Private Message';
$a->strings["I like this \x28toggle\x29"] = "I like this \x28toggle\x29";
$a->strings["I don't like this \x28toggle\x29"] = "I don't like this \x28toggle\x29";
+$a->strings['Share'] = 'Share';
$a->strings['Please wait'] = 'Please wait';
$a->strings['This is you'] = 'This is you';
+$a->strings['Edit'] = 'Edit';
$a->strings['Delete'] = 'Delete';
$a->strings['View $name\'s profile'] = 'View $name\'s profile';
$a->strings['View $owner_name\'s profile'] = 'View $owner_name\'s profile';
@@ -185,6 +187,18 @@ $a->strings['Wall-to-Wall'] = 'Wall-to-Wall';
$a->strings['via Wall-To-Wall:'] = 'via Wall-To-Wall:';
$a->strings['Item has been removed.'] = 'Item has been removed.';
$a->strings['Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.'] = 'Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.';
+$a->strings['Item not found'] = 'Item not found';
+$a->strings['Edit post'] = 'Edit post';
+$a->strings['Upload photo'] = 'Upload photo';
+$a->strings['Insert web link'] = 'Insert web link';
+$a->strings['Insert YouTube video'] = 'Insert YouTube video';
+$a->strings['Insert Vorbis [.ogg] video'] = 'Insert Vorbis [.ogg] video';
+$a->strings['Insert Vorbis [.ogg] audio'] = 'Insert Vorbis [.ogg] audio';
+$a->strings['Set your location'] = 'Set your location';
+$a->strings['Clear browser location'] = 'Clear browser location';
+$a->strings['Permission settings'] = 'Permission settings';
+$a->strings['CC: email addresses'] = 'CC: email addresses';
+$a->strings['Example: bob@example.com, mary@example.com'] = 'Example: bob@example.com, mary@example.com';
$a->strings['The profile address specified does not provide adequate information.'] = 'The profile address specified does not provide adequate information.';
$a->strings['Limited profile. This person will be unable to receive direct/personal notifications from you.'] = 'Limited profile. This person will be unable to receive direct/personal notifications from you.';
$a->strings['Unable to retrieve contact information.'] = 'Unable to retrieve contact information.';
@@ -240,16 +254,14 @@ $a->strings['Wall Photos'] = 'Wall Photos';
$a->strings["%s commented on your item at %s"] = "%s commented on your item at %s";
$a->strings["Administrator"] = "Administrator";
$a->strings["%s posted on your profile wall at %s"] = "%s posted on your profile wall at %s";
-$a->strings["Administrator@"] = "Administrator@";
$a->strings['System error. Post not saved.'] = 'System error. Post not saved.';
$a->strings['You may visit them online at'] = 'You may visit them online at';
$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Please contact the sender by replying to this post if you do not wish to receive these messages.';
$a->strings['%s posted an update.'] = '%s posted an update.';
$a->strings['photo'] = 'photo';
$a->strings['status'] = 'status';
-$a->strings['likes'] = 'likes';
-$a->strings['doesn\'t like'] = 'doesn\'t like';
-$a->strings["%s's"] = "%s's";
+$a->strings['%1$s likes %2$s\'s %3$s'] = '%1$s likes %2$s\'s %3$s';
+$a->strings['%1$s doesn\'t like %2$s\'s %3$s'] = '%1$s doesn\'t like %2$s\'s %3$s';
$a->strings['Remote privacy information not available.'] = 'Remote privacy information not available.';
$a->strings['Visible to:'] = 'Visible to:';
$a->strings["Welcome back %s"] = "Welcome back %s";
@@ -267,11 +279,10 @@ $a->strings['Outbox'] = 'Outbox';
$a->strings['New Message'] = 'New Message';
$a->strings['Message deleted.'] = 'Message deleted.';
$a->strings['Conversation removed.'] = 'Conversation removed.';
+$a->strings['Please enter a link URL:'] = 'Please enter a link URL:';
$a->strings['Send Private Message'] = 'Send Private Message';
$a->strings['To:'] = 'To:';
$a->strings['Subject:'] = 'Subject:';
-$a->strings['Upload photo'] = 'Upload photo';
-$a->strings['Insert web link'] = 'Insert web link';
$a->strings['No messages.'] = 'No messages.';
$a->strings['Delete conversation'] = 'Delete conversation';
$a->strings['Message not available.'] = 'Message not available.';
@@ -279,13 +290,10 @@ $a->strings['Delete message'] = 'Delete message';
$a->strings['Send Reply'] = 'Send Reply';
$a->strings['Normal View'] = 'Normal View';
$a->strings['New Item View'] = 'New Item View';
-$a->strings['Share'] = 'Share';
-$a->strings['Insert YouTube video'] = 'Insert YouTube video';
-$a->strings['Set your location'] = 'Set your location';
-$a->strings['Clear browser location'] = 'Clear browser location';
-$a->strings['Permission settings'] = 'Permission settings';
-$a->strings['CC: email addresses'] = 'CC: email addresses';
-$a->strings['Example: bob@example.com, mary@example.com'] = 'Example: bob@example.com, mary@example.com';
+$a->strings['Please enter a YouTube link:'] = 'Please enter a YouTube link:';
+$a->strings["Please enter a video\x28.ogg\x29 link/URL:"] = "Please enter a video\x28.ogg\x29 link/URL:";
+$a->strings["Please enter an audio\x28.ogg\x29 link/URL:"] = "Please enter an audio\x28.ogg\x29 link/URL:";
+$a->strings['Where are you right now?'] = 'Where are you right now?';
$a->strings['No such group'] = 'No such group';
$a->strings['Group is empty'] = 'Group is empty';
$a->strings['Group: '] = 'Group: ';
@@ -330,7 +338,9 @@ $a->strings['Edit Album'] = 'Edit Album';
$a->strings['View Photo'] = 'View Photo';
$a->strings['Photo not available'] = 'Photo not available';
$a->strings['Edit photo'] = 'Edit photo';
+$a->strings['<< Prev'] = '<< Prev';
$a->strings['View Full Size'] = 'View Full Size';
+$a->strings['Next >>'] = 'Next >>';
$a->strings['Tags: '] = 'Tags: ';
$a->strings['[Remove any tag]'] = '[Remove any tag]';
$a->strings['New album name'] = 'New album name';
@@ -340,6 +350,9 @@ $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #cam
$a->strings['Recent Photos'] = 'Recent Photos';
$a->strings['Upload New Photos'] = 'Upload New Photos';
$a->strings['View Album'] = 'View Album';
+$a->strings['Status'] = 'Status';
+$a->strings['Profile'] = 'Profile';
+$a->strings['Photos'] = 'Photos';
$a->strings['Image uploaded but image cropping failed.'] = 'Image uploaded but image cropping failed.';
$a->strings['Unable to process image'] = 'Unable to process image';
$a->strings['Image uploaded successfully.'] = 'Image uploaded successfully.';
@@ -384,6 +397,7 @@ $a->strings['Account approved.'] = 'Account approved.';
$a->strings['Remove My Account'] = 'Remove My Account';
$a->strings['This will completely remove your account. Once this has been done it is not recoverable.'] = 'This will completely remove your account. Once this has been done it is not recoverable.';
$a->strings['Please enter your password for verification:'] = 'Please enter your password for verification:';
+$a->strings['No results.'] = 'No results.';
$a->strings['Passwords do not match. Password unchanged.'] = 'Passwords do not match. Password unchanged.';
$a->strings['Empty passwords are not allowed. Password unchanged.'] = 'Empty passwords are not allowed. Password unchanged.';
$a->strings['Password changed.'] = 'Password changed.';
@@ -438,6 +452,7 @@ $a->strings['minutes'] = 'minutes';
$a->strings['second'] = 'second';
$a->strings['seconds'] = 'seconds';
$a->strings[' ago'] = ' ago';
+$a->strings['Cannot locate DNS info for database server \'%s\''] = 'Cannot locate DNS info for database server \'%s\'';
$a->strings['Create a new group'] = 'Create a new group';
$a->strings['Everybody'] = 'Everybody';
$a->strings['Birthday:'] = 'Birthday:';
@@ -623,7 +638,9 @@ $a->strings['America/Argentina/Jujuy'] = 'America/Argentina/Jujuy';
$a->strings['America/Argentina/La_Rioja'] = 'America/Argentina/La_Rioja';
$a->strings['America/Argentina/Mendoza'] = 'America/Argentina/Mendoza';
$a->strings['America/Argentina/Rio_Gallegos'] = 'America/Argentina/Rio_Gallegos';
+$a->strings['America/Argentina/Salta'] = 'America/Argentina/Salta';
$a->strings['America/Argentina/San_Juan'] = 'America/Argentina/San_Juan';
+$a->strings['America/Argentina/San_Luis'] = 'America/Argentina/San_Luis';
$a->strings['America/Argentina/Tucuman'] = 'America/Argentina/Tucuman';
$a->strings['America/Argentina/Ushuaia'] = 'America/Argentina/Ushuaia';
$a->strings['America/Aruba'] = 'America/Aruba';
@@ -701,7 +718,9 @@ $a->strings['America/Louisville'] = 'America/Louisville';
$a->strings['America/Maceio'] = 'America/Maceio';
$a->strings['America/Managua'] = 'America/Managua';
$a->strings['America/Manaus'] = 'America/Manaus';
+$a->strings['America/Marigot'] = 'America/Marigot';
$a->strings['America/Martinique'] = 'America/Martinique';
+$a->strings['America/Matamoros'] = 'America/Matamoros';
$a->strings['America/Mazatlan'] = 'America/Mazatlan';
$a->strings['America/Mendoza'] = 'America/Mendoza';
$a->strings['America/Menominee'] = 'America/Menominee';
@@ -720,6 +739,7 @@ $a->strings['America/Nome'] = 'America/Nome';
$a->strings['America/Noronha'] = 'America/Noronha';
$a->strings['America/North_Dakota/Center'] = 'America/North_Dakota/Center';
$a->strings['America/North_Dakota/New_Salem'] = 'America/North_Dakota/New_Salem';
+$a->strings['America/Ojinaga'] = 'America/Ojinaga';
$a->strings['America/Panama'] = 'America/Panama';
$a->strings['America/Pangnirtung'] = 'America/Pangnirtung';
$a->strings['America/Paramaribo'] = 'America/Paramaribo';
@@ -736,11 +756,14 @@ $a->strings['America/Regina'] = 'America/Regina';
$a->strings['America/Resolute'] = 'America/Resolute';
$a->strings['America/Rio_Branco'] = 'America/Rio_Branco';
$a->strings['America/Rosario'] = 'America/Rosario';
+$a->strings['America/Santa_Isabel'] = 'America/Santa_Isabel';
+$a->strings['America/Santarem'] = 'America/Santarem';
$a->strings['America/Santiago'] = 'America/Santiago';
$a->strings['America/Santo_Domingo'] = 'America/Santo_Domingo';
$a->strings['America/Sao_Paulo'] = 'America/Sao_Paulo';
$a->strings['America/Scoresbysund'] = 'America/Scoresbysund';
$a->strings['America/Shiprock'] = 'America/Shiprock';
+$a->strings['America/St_Barthelemy'] = 'America/St_Barthelemy';
$a->strings['America/St_Johns'] = 'America/St_Johns';
$a->strings['America/St_Kitts'] = 'America/St_Kitts';
$a->strings['America/St_Lucia'] = 'America/St_Lucia';
@@ -762,6 +785,7 @@ $a->strings['America/Yellowknife'] = 'America/Yellowknife';
$a->strings['Antarctica/Casey'] = 'Antarctica/Casey';
$a->strings['Antarctica/Davis'] = 'Antarctica/Davis';
$a->strings['Antarctica/DumontDUrville'] = 'Antarctica/DumontDUrville';
+$a->strings['Antarctica/Macquarie'] = 'Antarctica/Macquarie';
$a->strings['Antarctica/Mawson'] = 'Antarctica/Mawson';
$a->strings['Antarctica/McMurdo'] = 'Antarctica/McMurdo';
$a->strings['Antarctica/Palmer'] = 'Antarctica/Palmer';
@@ -798,6 +822,7 @@ $a->strings['Asia/Dubai'] = 'Asia/Dubai';
$a->strings['Asia/Dushanbe'] = 'Asia/Dushanbe';
$a->strings['Asia/Gaza'] = 'Asia/Gaza';
$a->strings['Asia/Harbin'] = 'Asia/Harbin';
+$a->strings['Asia/Ho_Chi_Minh'] = 'Asia/Ho_Chi_Minh';
$a->strings['Asia/Hong_Kong'] = 'Asia/Hong_Kong';
$a->strings['Asia/Hovd'] = 'Asia/Hovd';
$a->strings['Asia/Irkutsk'] = 'Asia/Irkutsk';
@@ -809,7 +834,9 @@ $a->strings['Asia/Kabul'] = 'Asia/Kabul';
$a->strings['Asia/Kamchatka'] = 'Asia/Kamchatka';
$a->strings['Asia/Karachi'] = 'Asia/Karachi';
$a->strings['Asia/Kashgar'] = 'Asia/Kashgar';
+$a->strings['Asia/Kathmandu'] = 'Asia/Kathmandu';
$a->strings['Asia/Katmandu'] = 'Asia/Katmandu';
+$a->strings['Asia/Kolkata'] = 'Asia/Kolkata';
$a->strings['Asia/Krasnoyarsk'] = 'Asia/Krasnoyarsk';
$a->strings['Asia/Kuala_Lumpur'] = 'Asia/Kuala_Lumpur';
$a->strings['Asia/Kuching'] = 'Asia/Kuching';
@@ -821,6 +848,7 @@ $a->strings['Asia/Makassar'] = 'Asia/Makassar';
$a->strings['Asia/Manila'] = 'Asia/Manila';
$a->strings['Asia/Muscat'] = 'Asia/Muscat';
$a->strings['Asia/Nicosia'] = 'Asia/Nicosia';
+$a->strings['Asia/Novokuznetsk'] = 'Asia/Novokuznetsk';
$a->strings['Asia/Novosibirsk'] = 'Asia/Novosibirsk';
$a->strings['Asia/Omsk'] = 'Asia/Omsk';
$a->strings['Asia/Oral'] = 'Asia/Oral';
diff --git a/util/typo.php b/util/typo.php
index ac61ef6d3..84a50e15e 100644
--- a/util/typo.php
+++ b/util/typo.php
@@ -41,7 +41,10 @@
echo 'util/strings.php' . "\n";
include_once('util/strings.php');
+ echo count($a->strings) . ' strings' . "\n";
+
$files = glob('view/*/strings.php');
+
foreach($files as $file) {
echo $file . "\n";
include_once($file);