From 10b4de915588b381c94bed83b777ebbe953d8cba Mon Sep 17 00:00:00 2001
From: filip
Date: Mon, 4 Aug 2014 19:11:09 +0200
Subject: transition of missing.php to gettext only, move from svn to git,
minor improvements
---
langs/missing.php | 61 +++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 36 deletions(-)
(limited to 'langs/missing.php')
diff --git a/langs/missing.php b/langs/missing.php
index db267864e..552cf4abe 100644
--- a/langs/missing.php
+++ b/langs/missing.php
@@ -12,54 +12,47 @@ if (is_null($s)) {
die;
}
-if (strrpos($s, '.pot')) {
- $gettext = true;
- $resource = _extract_resource($s);
- $file = _po_file_switch($s, $l);
- $to_translate = '/langs/' .$s . '';
-} else {
- $gettext = false;
- $resource = _extract_resource($s, '.en.lang');
- $file = _lang_file_switch($s, $l);
- $to_translate = '';
-}
+$resource = _extract_resource($s);
+$to_translate = '/langs/' .$s . '';
-if($resource =='constitution') {
+if($resource =='about/constitution') {
$constitution = true;
} else {
$constitution = false;
}
-if($resource =='license') {
+if($resource =='about/license') {
$license = true;
} else {
$license = false;
}
-if ($s == '../_nav/langs/en.lang') {
- $file = substr(_lang_file_switch($s, $l), 14);
+if ($s == '../_nav/langs/en.pot') {
+ $file = substr(_po_file_switch($s, $l), 14);
$note = ' NOTE: THIS IS TRANSLATION OF NAVIGATION SO LOCATION FOR COMMIT IS DIFFERENT!';
- $commit = 'web/www/trunk/_nav/langs/' . $file . ' and for now to the web/nav/langs/' . $file . ' too';
- $to_translate = '';
+ $commit = '/_nav/langs/' . $file . '';
+ $file = '/_nav/langs/' . $file;
+ $to_translate = '/_nav/langs/en.pot';
} else {
+ $file = '/langs/' . _po_file_switch($s, $l);
$note = '';
- $commit = 'web/www/trunk/langs/' . $file;
+ $commit = '' . $file . '';
}
$constitution_or_license = '';
if($constitution) {
- $constitution_or_license .= 'Please translate constitution first
';
- $constitution_or_license .= 'You can find it in svn. ';
+ $constitution_or_license .= '
Please translate separate constitution file fully into ' . $langs[$l] . ' first
';
+ $constitution_or_license .= 'You can find it in git.';
}
$num_of_untranslated_strings = 0;
if($license) {
- $constitution_or_license .= '
Please translate license into ' . $langs[$l] . ' first
';
- $constitution_or_license .= sprintf('You can find it in git. ', $l); // git doesn't work yet on https
+ $constitution_or_license .= '
Please translate separate license file into ' . $langs[$l] . ' first
';
+ $constitution_or_license .= 'You can find it as a part of a separate drakx translation file in git or in Transifex (it starts before the line with the string "1. License Agreement").'; // git doesn't work yet on https
}
if($constitution || $license) {
- $constitution_or_license .= 'Please read page on wiki for more information about that.
Then:
';
+ $constitution_or_license .= ' Please read page on wiki for more information about that.
Then:
';
}
?>
@@ -72,30 +65,26 @@ if($constitution || $license) {
« back to the report page for
-Missing language file
+Missing language file -
+
+Note that you can translate most of our web page resources online in Transifex.
+Please take a look off the translation guide on the localization Wiki page too.
+
So,
language file is missing in ', $l, ')' ?>. What can you do to help us?
Copy the source file ' . $to_translate . ' in gettext editor of your choice and rename it to ' . $file . '
.' . $note . '' . PHP_EOL;
- echo ' - You can also translate directly on our project in transifex.
' . PHP_EOL;
- $to_translate = ''; // don't show it bellow
-} else {
- echo ' - Copy the source file from the frame below in a text editor and rename it to
' . $file . '
.' . $note . ' ' . PHP_EOL;
- echo ' - Replace and translate the strings that are just after the lines starting with a ";". Be careful to always keep your translated text on a single line.
' . PHP_EOL;
-} ?>
+echo ' - You can start translating the source file ' . $to_translate . ' in Transifex or any other gettext editor of your choice and rename it to
' . $file . '
.' . $note . ' ' . PHP_EOL;
+?>
- Then:
- - You can look to the translation guide on the localization Wiki page too.
Thanks!
-