Translations: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
(Created page with "This allows you to make alternative phrases in other languages. That can be swapped if applicable to a users Language. =Language= Select from customised phrases. =English= P...")
 
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This allows you to make alternative phrases in other languages.
This allows you to make alternative phrases in other languages that can be used instead of nuBuilder Forte's English (Australian) phrases.


That can be swapped if applicable to a users Language.
The translated phrases for all supported languages are stored in the <tt>zzzzsys_translate</tt> table.


=Language=
=Language=
Select from customised phrases.
The [[User_Access#Language|User's]] language stored in the field <tt>zzzzsys_translate.trl_language</tt>.
 
== Dialects ==
Any changes to the English Translation (Australian) for other dialects like UK, US, Indian, etc can be treated as another language (UKEnglish, USEnglish, INEnglish) having the override strings alone with the parent English as fallback for strings not present in these modded dialects.
 
This method cannot be used directly for dialects of '''non-English''' languages where '''UPDATE''' statements can be used with base language '''INSERT'''s.
 
== Translation contribution Platform ==
Users can request the Project Admin (@'''kev1n''' in the forum) to be part of the translation platform in specific language teams. The platform is available at https://translation.nubuilder.cloud/
 
=English=
=English=
Phrase used in nuBuilder Forte.
A translatable phrase used in nuBuilder Forte.
 
=== Locations of Translatable Strings ===
* PHP files
* JS files
* inside '''nubuilder4.sql''' as data in fields
 
Files in libraries have their own translations either as '''gettext''' or '''arrays''' and are not part of the core nuBuilder translations.
 
=== Non translatable Strings ===
As of [https://github.com/nuBuilder/nuBuilder-4.5/commit/732d488dc760a7544828d106243c74dd87b9eb7a nuBuilder 4.5 build dated 2021-05-14], all non translatable captions are prefixed with a pipe character ('''|''') and nuTranslate will return the string untranslated after removing the prefixed pipe character.
 
=Translation=
=Translation=
Phrase used in this language.
* The translated phrase used in the selected language is in the field <tt>trl_translation</tt>.
* Can safely delete unused language translations in the <tt>zzzzsys_translate</tt> table.
* All system translations will have the ID starting with <tt>nu</tt>.
* In v4.5, the various language translations are in separate sql files in the <tt>core/languages</tt> folder, whereas, in v4, the language translation strings are in the <tt>nubuilder4.sql</tt> file itself.
* In v4.5, only the languages chosen in the <tt>Setup => Languages</tt> menu would have their translation strings in the SQL backup of the nuBuilder database.
 
== Best Practices ==
* Technical English key words (in context) are best transliterated like ORDER BY, SORT BY, etc
* Common easily understood English abbreviations and application specific proper nouns are best left as is like SQL, CSV, nuBuilder, nuDebug, etc
* Where transliteration of English words can cause confusion with vernacular / colloquial words, proper translation is essential.
* Keep translations short to fit in button / alert box / menu widths.
* Practical understanding preferred over grammatically correct phrases in translations
* Re-arrange order of translated words to accommodate prefix / suffix of variables to match the English context
* Prim and proper exact translations that are not common or require a deep knowledge of the target language should be substituted for those in  common parlance / vogue.
 
=== Edit in MySQL ===
<pre>
-- first import proposed translations and view the differences
 
SELECT a.*, b.trl_translation FROM nubuilder45.zzzzsys_translate a INNER JOIN nubuilder45.proposed_translate b USING (zzzzsys_translate_id)
WHERE a.trl_translation <> b.trl_translation;
 
-- manual corrections
 
-- Backporting
 
SELECT a.*, b.trl_translation FROM nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id)
WHERE a.trl_translation <> b.trl_translation;
 
/*
update nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id)
SET a.trl_translation = b.trl_translation
WHERE a.trl_translation <> b.trl_translation;
*/
</pre>
 
== Supported Languages ==
 
=== Translation Stats ===
<pre>
/* Translation Stats */
SELECT trl_language
  , COUNT(*) AS translated_strings
  , (SELECT COUNT(DISTINCT trl_english) FROM `zzzzsys_translate` a)-COUNT(*) AS ToTranslate
FROM `zzzzsys_translate` GROUP BY trl_language ORDER BY translated_strings DESC;
 
/* Find Duplicates in all langages */
SELECT trl_language, trl_english, COUNT(*) AS records FROM `zzzzsys_translate`
GROUP BY trl_language, trl_english HAVING records > 1;
 
/* Missing Strings */
SET @lang:='German'; -- choose your language here
 
SELECT a.trl_english
FROM `zzzzsys_translate` a LEFT JOIN
(SELECT b.trl_english FROM zzzzsys_translate b WHERE b.trl_language = @lang) lang
USING (trl_english)
WHERE lang.trl_english IS NULL
GROUP BY a.trl_english;
</pre>
 
=== NuBuilder v4 Updated Version, v4.5 ===
'''''Bold''' indicates 100% Translation'' of '''211''' strings available in v4 | [[index.php?title=Media:Translations v4.png|Status]]
 
'''''Bold and Italic''' indicates nearly or 100% Translation'' of '''262''' strings available in v4.5+ | [[index.php?title=Media:Translations v4.5.png|Status]]
 
Translation maintainers Forum '''usernames''' are in brackets.
 
* Arabic
* '''Armenian'''
*'''''Catalan''''' (quintangai)
* Chinese
* Czech
* '''''French'''''
* '''''German''''' (kev1n)
* Greek
* '''''Hindi''''' (nc07)
* Italian
* Malay
* '''Russian'''
* Spanish (Giu, quintangai)
* '''''Tamil''''' (apmuthu)
* Vietnamese

Latest revision as of 01:01, 21 January 2022

This allows you to make alternative phrases in other languages that can be used instead of nuBuilder Forte's English (Australian) phrases.

The translated phrases for all supported languages are stored in the zzzzsys_translate table.

Language

The User's language stored in the field zzzzsys_translate.trl_language.

Dialects

Any changes to the English Translation (Australian) for other dialects like UK, US, Indian, etc can be treated as another language (UKEnglish, USEnglish, INEnglish) having the override strings alone with the parent English as fallback for strings not present in these modded dialects.

This method cannot be used directly for dialects of non-English languages where UPDATE statements can be used with base language INSERTs.

Translation contribution Platform

Users can request the Project Admin (@kev1n in the forum) to be part of the translation platform in specific language teams. The platform is available at https://translation.nubuilder.cloud/

English

A translatable phrase used in nuBuilder Forte.

Locations of Translatable Strings

  • PHP files
  • JS files
  • inside nubuilder4.sql as data in fields

Files in libraries have their own translations either as gettext or arrays and are not part of the core nuBuilder translations.

Non translatable Strings

As of nuBuilder 4.5 build dated 2021-05-14, all non translatable captions are prefixed with a pipe character (|) and nuTranslate will return the string untranslated after removing the prefixed pipe character.

Translation

  • The translated phrase used in the selected language is in the field trl_translation.
  • Can safely delete unused language translations in the zzzzsys_translate table.
  • All system translations will have the ID starting with nu.
  • In v4.5, the various language translations are in separate sql files in the core/languages folder, whereas, in v4, the language translation strings are in the nubuilder4.sql file itself.
  • In v4.5, only the languages chosen in the Setup => Languages menu would have their translation strings in the SQL backup of the nuBuilder database.

Best Practices

  • Technical English key words (in context) are best transliterated like ORDER BY, SORT BY, etc
  • Common easily understood English abbreviations and application specific proper nouns are best left as is like SQL, CSV, nuBuilder, nuDebug, etc
  • Where transliteration of English words can cause confusion with vernacular / colloquial words, proper translation is essential.
  • Keep translations short to fit in button / alert box / menu widths.
  • Practical understanding preferred over grammatically correct phrases in translations
  • Re-arrange order of translated words to accommodate prefix / suffix of variables to match the English context
  • Prim and proper exact translations that are not common or require a deep knowledge of the target language should be substituted for those in common parlance / vogue.

Edit in MySQL

-- first import proposed translations and view the differences

SELECT a.*, b.trl_translation FROM nubuilder45.zzzzsys_translate a INNER JOIN nubuilder45.proposed_translate b USING (zzzzsys_translate_id) 
WHERE a.trl_translation <> b.trl_translation;

-- manual corrections

-- Backporting

SELECT a.*, b.trl_translation FROM nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id) 
WHERE a.trl_translation <> b.trl_translation;

/*
update nubuilder4.zzzzsys_translate a INNER JOIN nubuilder45.zzzzsys_translate b USING (zzzzsys_translate_id) 
SET a.trl_translation = b.trl_translation
WHERE a.trl_translation <> b.trl_translation;
*/

Supported Languages

Translation Stats

/* Translation Stats */
SELECT trl_language
  , COUNT(*) AS translated_strings
  , (SELECT COUNT(DISTINCT trl_english) FROM `zzzzsys_translate` a)-COUNT(*) AS ToTranslate 
FROM `zzzzsys_translate` GROUP BY trl_language ORDER BY translated_strings DESC;

/* Find Duplicates in all langages */
SELECT trl_language, trl_english, COUNT(*) AS records FROM `zzzzsys_translate` 
GROUP BY trl_language, trl_english HAVING records > 1;

/* Missing Strings */
SET @lang:='German'; -- choose your language here

SELECT a.trl_english
FROM `zzzzsys_translate` a LEFT JOIN 
(SELECT b.trl_english FROM zzzzsys_translate b WHERE b.trl_language = @lang) lang
USING (trl_english)
WHERE lang.trl_english IS NULL
GROUP BY a.trl_english;

NuBuilder v4 Updated Version, v4.5

Bold indicates 100% Translation of 211 strings available in v4 | Status

Bold and Italic indicates nearly or 100% Translation of 262 strings available in v4.5+ | Status

Translation maintainers Forum usernames are in brackets.

  • Arabic
  • Armenian
  • Catalan (quintangai)
  • Chinese
  • Czech
  • French
  • German (kev1n)
  • Greek
  • Hindi (nc07)
  • Italian
  • Malay
  • Russian
  • Spanish (Giu, quintangai)
  • Tamil (apmuthu)
  • Vietnamese