22 translation files have syntax errors #3540

Open
opened 2023-03-14 01:34:15 +01:00 by Wuzzy · 6 comments
Member

MineClone2 version: 7b53b6e45f

What happened?

I've written a quick and dirty Python script to automatically test locale files (*.tr and template.txt) for syntax errors such as missing placeholders or bad escaping.

I'm running this script on various games now to see what happens and in MCL2 the script has found a lot of errors.

This is the test result:

Error (./HELP/mcl_tt/locale/mcl_tt.fr.tr:48): Missing placeholder(s) in translation
Error (./HELP/mcl_tt/locale/mcl_tt.pl.tr:6): Missing placeholder(s) in translation
Error (./HELP/doc/doc/locale/doc.fr.tr:27): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.fr.tr:6): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.fr.tr:99): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:56): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:57): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:81): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:126): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:56): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:57): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:81): Missing placeholder(s) in translation
Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:126): Missing placeholder(s) in translation
Error (./HELP/mcl_doc/locale/mcl_doc.fr.tr:53): Missing placeholder(s) in translation
Error (./HELP/mcl_doc/locale/mcl_doc.de.tr:54): Missing placeholder(s) in translation
Error (./HELP/mcl_doc/locale/mcl_doc.pl.tr:53): Missing placeholder(s) in translation
Error (./HUD/awards/locale/awards.de.tr:4): Missing placeholder(s) in translation
Error (./HUD/awards/locale/awards.ru.tr:9): Placeholder symbol '@1' is not in the correct ascending order in source string
Error (./HUD/mcl_death_messages/locale/mcl_death_messages.fr.tr:9): Missing placeholder(s) in translation
Error (./ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.es.tr:3): Missing placeholder(s) in translation
Error (./ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.es.tr:4): Missing placeholder(s) in translation
Error (./ITEMS/mcl_banners/locale/mcl_banners.fr.tr:54): Missing placeholder(s) in translation
Warning (./ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/screwdriver.zh_TW.tr:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/screwdriver.zh_TW.tr): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/screwdriver.ru.tr:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/screwdriver.ru.tr): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/screwdriver.ja.tr:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/screwdriver.ja.tr): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/screwdriver.fr.tr:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/screwdriver.fr.tr): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/screwdriver.pl.tr:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/screwdriver.pl.tr): No textdomain in file!
Error (./ITEMS/mcl_farming/locale/mcl_farming.fr.tr:19): Missing placeholder(s) in translation
Error (./ITEMS/mcl_buckets/locale/mcl_buckets.fr.tr:23): Missing placeholder(s) in translation
Error (./ITEMS/mcl_core/locale/mcl_core.pt_BR.tr:221): Invalid line type (neither empty, comment or translation)
Error (./ITEMS/mcl_books/locale/mcl_books.pl.tr:5): Missing placeholder(s) in translation
Error (./ITEMS/mcl_books/locale/mcl_books.pl.tr:6): Missing placeholder(s) in translation
Warning (./ITEMS/mcl_honey/locale/mcl_honey.ja.tr): No textdomain in file!
Error (./ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Bad escape(s) in translation
Error (./ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Missing placeholder(s) in translation
Error (./ENVIRONMENT/lightning/locale/lightning.es.tr:2): Bad escape(s) in translation
Error (./ENVIRONMENT/lightning/locale/lightning.es.tr:2): Missing placeholder(s) in translation
Error (./HUD/mcl_achievements/locale/template.txt:69): Invalid line type (neither empty, comment or translation)
Warning (./ITEMS/mcl_beehives/locale/template.txt): No textdomain in file!
Warning (./ITEMS/screwdriver/locale/template.txt:1): Missing space between '#' and 'textdomain'. Intentional?
Warning (./ITEMS/screwdriver/locale/template.txt): No textdomain in file!
Warning (./ITEMS/mcl_honey/locale/template.txt): No textdomain in file!
------------
TEST RESULT:
------------
939 file(s) checked. Test FAILED!
22 file(s) with error(s).
10 file(s) with warnings.

What should happen:

The script should return 0 errors.

Possible fixes

Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference.

If you happen to speak the language, fix the translation yourself.

You might also check if running the locale update script fixes some of these already.

Steps to reproduce

  1. Go to https://codeberg.org/Wuzzy/minetest_check_translations
  2. Read the source code and README so you understand what this script does
  3. Copy the Python script to the mods directory of MCL2
  4. Run it
MineClone2 version: 7b53b6e45f62f43b8e79b999c9bd8d73ba2e9f64 ### What happened? I've written a quick and dirty Python script to automatically test locale files (`*.tr` and `template.txt`) for syntax errors such as missing placeholders or bad escaping. I'm running this script on various games now to see what happens and in MCL2 the script has found a lot of errors. This is the test result: ``` Error (./HELP/mcl_tt/locale/mcl_tt.fr.tr:48): Missing placeholder(s) in translation Error (./HELP/mcl_tt/locale/mcl_tt.pl.tr:6): Missing placeholder(s) in translation Error (./HELP/doc/doc/locale/doc.fr.tr:27): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.fr.tr:6): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.fr.tr:99): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:56): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:57): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:81): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt_BR.tr:126): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:56): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:57): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:81): Missing placeholder(s) in translation Error (./HELP/doc/doc_items/locale/doc_items.pt.tr:126): Missing placeholder(s) in translation Error (./HELP/mcl_doc/locale/mcl_doc.fr.tr:53): Missing placeholder(s) in translation Error (./HELP/mcl_doc/locale/mcl_doc.de.tr:54): Missing placeholder(s) in translation Error (./HELP/mcl_doc/locale/mcl_doc.pl.tr:53): Missing placeholder(s) in translation Error (./HUD/awards/locale/awards.de.tr:4): Missing placeholder(s) in translation Error (./HUD/awards/locale/awards.ru.tr:9): Placeholder symbol '@1' is not in the correct ascending order in source string Error (./HUD/mcl_death_messages/locale/mcl_death_messages.fr.tr:9): Missing placeholder(s) in translation Error (./ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.es.tr:3): Missing placeholder(s) in translation Error (./ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.es.tr:4): Missing placeholder(s) in translation Error (./ITEMS/mcl_banners/locale/mcl_banners.fr.tr:54): Missing placeholder(s) in translation Warning (./ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr): No textdomain in file! Warning (./ITEMS/screwdriver/locale/screwdriver.zh_TW.tr:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/screwdriver.zh_TW.tr): No textdomain in file! Warning (./ITEMS/screwdriver/locale/screwdriver.ru.tr:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/screwdriver.ru.tr): No textdomain in file! Warning (./ITEMS/screwdriver/locale/screwdriver.ja.tr:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/screwdriver.ja.tr): No textdomain in file! Warning (./ITEMS/screwdriver/locale/screwdriver.fr.tr:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/screwdriver.fr.tr): No textdomain in file! Warning (./ITEMS/screwdriver/locale/screwdriver.pl.tr:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/screwdriver.pl.tr): No textdomain in file! Error (./ITEMS/mcl_farming/locale/mcl_farming.fr.tr:19): Missing placeholder(s) in translation Error (./ITEMS/mcl_buckets/locale/mcl_buckets.fr.tr:23): Missing placeholder(s) in translation Error (./ITEMS/mcl_core/locale/mcl_core.pt_BR.tr:221): Invalid line type (neither empty, comment or translation) Error (./ITEMS/mcl_books/locale/mcl_books.pl.tr:5): Missing placeholder(s) in translation Error (./ITEMS/mcl_books/locale/mcl_books.pl.tr:6): Missing placeholder(s) in translation Warning (./ITEMS/mcl_honey/locale/mcl_honey.ja.tr): No textdomain in file! Error (./ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Bad escape(s) in translation Error (./ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Missing placeholder(s) in translation Error (./ENVIRONMENT/lightning/locale/lightning.es.tr:2): Bad escape(s) in translation Error (./ENVIRONMENT/lightning/locale/lightning.es.tr:2): Missing placeholder(s) in translation Error (./HUD/mcl_achievements/locale/template.txt:69): Invalid line type (neither empty, comment or translation) Warning (./ITEMS/mcl_beehives/locale/template.txt): No textdomain in file! Warning (./ITEMS/screwdriver/locale/template.txt:1): Missing space between '#' and 'textdomain'. Intentional? Warning (./ITEMS/screwdriver/locale/template.txt): No textdomain in file! Warning (./ITEMS/mcl_honey/locale/template.txt): No textdomain in file! ------------ TEST RESULT: ------------ 939 file(s) checked. Test FAILED! 22 file(s) with error(s). 10 file(s) with warnings. ``` ### What should happen: The script should return 0 errors. ### Possible fixes Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference. If you happen to speak the language, fix the translation yourself. You might also check if running the locale update script fixes some of these already. ### Steps to reproduce 1. Go to https://codeberg.org/Wuzzy/minetest_check_translations 2. Read the source code and README so you understand what this script does 3. Copy the Python script to the `mods` directory of MCL2 4. Run it
Wuzzy added the
bug
unconfirmed
labels 2023-03-14 01:34:15 +01:00
Wuzzy changed title from 60 translation files have syntax errors to 55 translation files have syntax errors 2023-03-14 01:41:11 +01:00
Wuzzy changed title from 55 translation files have syntax errors to 22 translation files have syntax errors 2023-03-14 11:46:24 +01:00
Author
Member

OK, it turned out my script had a lot of false-positives so I've rewrote and re-run it, and they seem legit now. But there are still 22 errors left, and they seem legit. Plus some warnings.

OK, it turned out my script had a lot of false-positives so I've rewrote and re-run it, and they seem legit now. But there are still 22 errors left, and they seem legit. Plus some warnings.

OK, it turned out my script had a lot of false-positives so I've rewrote and re-run it, and they seem legit now. But there are still 22 errors left, and they seem legit. Plus some warnings.

Phew. That seemed a big bit of work! This looks more manageable. Thanks for running this and sharing the results.

Oh, and thanks for MineClone2 and all the energy you invested in it! :D

> OK, it turned out my script had a lot of false-positives so I've rewrote and re-run it, and they seem legit now. But there are still 22 errors left, and they seem legit. Plus some warnings. Phew. That seemed a big bit of work! This looks more manageable. Thanks for running this and sharing the results. Oh, and thanks for MineClone2 and all the energy you invested in it! :D
ancientmarinerdev added
#P3: elevated
translation
and removed
unconfirmed
labels 2023-03-14 15:14:46 +01:00
Author
Member

After the French update, the script now returns:

Error (./mods/HELP/mcl_tt/locale/mcl_tt.pl.tr:6): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:56): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:57): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:81): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:126): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:56): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:57): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:81): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:126): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/mcl_doc/locale/mcl_doc.de.tr:54): Missing placeholder(s) in translation: '@1' 
Error (./mods/HELP/mcl_doc/locale/mcl_doc.pl.tr:53): Missing placeholder(s) in translation: '@1' 
Error (./mods/HUD/awards/locale/awards.de.tr:4): Missing placeholder(s) in translation: '@1' 
Error (./mods/HUD/awards/locale/awards.ru.tr:9): Placeholder '@1' in source string was repeated
Error (./mods/HUD/awards/locale/awards.ja.tr:46): Placeholder '@2' in translation doesn't exist in source string
Error (./mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.es.tr:3): Missing placeholder(s) in translation: '@1' 
Error (./mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.es.tr:4): Missing placeholder(s) in translation: '@1' '@2' 
Warning (./mods/ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr): No textdomain in file
Error (./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr:90): Missing placeholder(s) in translation: '@2' 
Error (./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr:91): Missing placeholder(s) in translation: '@2' 
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.zh_TW.tr:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.zh_TW.tr): No textdomain in file
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ru.tr:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ru.tr): No textdomain in file
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ja.tr:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ja.tr): No textdomain in file
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.fr.tr:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.fr.tr): No textdomain in file
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.pl.tr:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/screwdriver.pl.tr): No textdomain in file
Error (./mods/ITEMS/mcl_core/locale/mcl_core.pt_BR.tr:221): Invalid line type (neither empty, comment, textdomain or translation)
Error (./mods/ITEMS/mcl_books/locale/mcl_books.pl.tr:5): Missing placeholder(s) in translation: '@1' 
Error (./mods/ITEMS/mcl_books/locale/mcl_books.pl.tr:6): Missing placeholder(s) in translation: '@1' 
Warning (./mods/ITEMS/mcl_honey/locale/mcl_honey.ja.tr): No textdomain in file
Error (./mods/ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Bad escape code in translation: '@ '
Error (./mods/ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Missing placeholder(s) in translation: '@1' 
Error (./mods/ENVIRONMENT/lightning/locale/lightning.es.tr:2): Bad escape code in translation: '@ '
Error (./mods/ENVIRONMENT/lightning/locale/lightning.es.tr:2): Missing placeholder(s) in translation: '@1' 
Error (./mods/HUD/mcl_achievements/locale/template.txt:69): Invalid line type (neither empty, comment, textdomain or translation)
Error (./mods/ITEMS/mcl_armor/locale/template.txt:34): Non-empty translation in template file
Error (./mods/ITEMS/mcl_deepslate/locale/template.txt:53): Non-empty translation in template file
Warning (./mods/ITEMS/mcl_beehives/locale/template.txt): No textdomain in file
Error (./mods/ITEMS/mcl_enchanting/locale/template.txt:133): Non-empty translation in template file
Warning (./mods/ITEMS/screwdriver/locale/template.txt:1): Missing space between '#' and 'textdomain'
Warning (./mods/ITEMS/screwdriver/locale/template.txt): No textdomain in file
Warning (./mods/ITEMS/mcl_honey/locale/template.txt): No textdomain in file
------------
TEST RESULT:
------------
939 file(s) checked. Test FAILED!
19 file(s) with error(s).
10 file(s) with warnings.
53 file(s) with empty translations.

(Note I've added a new error type to the script which is why the number of errors went down by only 2.)

If you have any questions, just ask.

After the French update, the script now returns: ``` Error (./mods/HELP/mcl_tt/locale/mcl_tt.pl.tr:6): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:56): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:57): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:81): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt_BR.tr:126): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:56): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:57): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:81): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/doc/doc_items/locale/doc_items.pt.tr:126): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/mcl_doc/locale/mcl_doc.de.tr:54): Missing placeholder(s) in translation: '@1' Error (./mods/HELP/mcl_doc/locale/mcl_doc.pl.tr:53): Missing placeholder(s) in translation: '@1' Error (./mods/HUD/awards/locale/awards.de.tr:4): Missing placeholder(s) in translation: '@1' Error (./mods/HUD/awards/locale/awards.ru.tr:9): Placeholder '@1' in source string was repeated Error (./mods/HUD/awards/locale/awards.ja.tr:46): Placeholder '@2' in translation doesn't exist in source string Error (./mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.es.tr:3): Missing placeholder(s) in translation: '@1' Error (./mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.es.tr:4): Missing placeholder(s) in translation: '@1' '@2' Warning (./mods/ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr): No textdomain in file Error (./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr:90): Missing placeholder(s) in translation: '@2' Error (./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr:91): Missing placeholder(s) in translation: '@2' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.zh_TW.tr:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.zh_TW.tr): No textdomain in file Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ru.tr:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ru.tr): No textdomain in file Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ja.tr:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.ja.tr): No textdomain in file Warning (./mods/ITEMS/screwdriver/locale/screwdriver.fr.tr:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.fr.tr): No textdomain in file Warning (./mods/ITEMS/screwdriver/locale/screwdriver.pl.tr:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/screwdriver.pl.tr): No textdomain in file Error (./mods/ITEMS/mcl_core/locale/mcl_core.pt_BR.tr:221): Invalid line type (neither empty, comment, textdomain or translation) Error (./mods/ITEMS/mcl_books/locale/mcl_books.pl.tr:5): Missing placeholder(s) in translation: '@1' Error (./mods/ITEMS/mcl_books/locale/mcl_books.pl.tr:6): Missing placeholder(s) in translation: '@1' Warning (./mods/ITEMS/mcl_honey/locale/mcl_honey.ja.tr): No textdomain in file Error (./mods/ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Bad escape code in translation: '@ ' Error (./mods/ITEMS/mcl_fire/locale/mcl_fire.es.tr:15): Missing placeholder(s) in translation: '@1' Error (./mods/ENVIRONMENT/lightning/locale/lightning.es.tr:2): Bad escape code in translation: '@ ' Error (./mods/ENVIRONMENT/lightning/locale/lightning.es.tr:2): Missing placeholder(s) in translation: '@1' Error (./mods/HUD/mcl_achievements/locale/template.txt:69): Invalid line type (neither empty, comment, textdomain or translation) Error (./mods/ITEMS/mcl_armor/locale/template.txt:34): Non-empty translation in template file Error (./mods/ITEMS/mcl_deepslate/locale/template.txt:53): Non-empty translation in template file Warning (./mods/ITEMS/mcl_beehives/locale/template.txt): No textdomain in file Error (./mods/ITEMS/mcl_enchanting/locale/template.txt:133): Non-empty translation in template file Warning (./mods/ITEMS/screwdriver/locale/template.txt:1): Missing space between '#' and 'textdomain' Warning (./mods/ITEMS/screwdriver/locale/template.txt): No textdomain in file Warning (./mods/ITEMS/mcl_honey/locale/template.txt): No textdomain in file ------------ TEST RESULT: ------------ 939 file(s) checked. Test FAILED! 19 file(s) with error(s). 10 file(s) with warnings. 53 file(s) with empty translations. ``` (Note I've added a new error type to the script which is why the number of errors went down by only 2.) If you have any questions, just ask.
ancientmarinerdev added
looking for contributor
#P4 priority: medium
and removed
#P3: elevated
labels 2023-04-17 20:52:26 +02:00
ancientmarinerdev added this to the 3 - Near future milestone 2023-04-17 20:52:39 +02:00

If the errors still persist, I would like to help fixing them for the German translation if you tell me what I have to do when there is the error message Missing placeholder(s) in translation: '@1' (or @2) in your list.

Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference.
If you happen to speak the language, fix the translation yourself.

Can you give me an example how to fix the syntax errors or missing placeholders?

If the errors still persist, I would like to help fixing them for the German translation if you tell me what I have to do when there is the error message `Missing placeholder(s) in translation: '@1' ` (or @2) in your list. > Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference. > If you happen to speak the language, fix the translation yourself. Can you give me an example how to fix the syntax errors or missing placeholders?

If the errors still persist, I would like to help fixing them for the German translation if you tell me what I have to do when there is the error message Missing placeholder(s) in translation: '@1' (or @2) in your list.

Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference.
If you happen to speak the language, fix the translation yourself.

Can you give me an example how to fix the syntax errors or missing placeholders?

Basically, translation files look like

Original string in English=Übersetzte Zeichenfolge auf Deutsch

and the original string may have stuff like @1, @2 and so on in them, which are obviously placeholders for something that can be filled when the string is used. The translated string should contain the placeholders appropriately placed in the same amount (and there should be no space between @ and the number).

However, I don't think you would find any in the German translation in particular.

> If the errors still persist, I would like to help fixing them for the German translation if you tell me what I have to do when there is the error message `Missing placeholder(s) in translation: '@1' ` (or @2) in your list. > > > Easiest fix: Clear the offending strings. Maybe move a copy of the broken string to the bottom as a comment for future reference. > > If you happen to speak the language, fix the translation yourself. > > Can you give me an example how to fix the syntax errors or missing placeholders? Basically, translation files look like ``` Original string in English=Übersetzte Zeichenfolge auf Deutsch ``` and the original string may have stuff like `@1`, `@2` and so on in them, which are obviously placeholders for something that can be filled when the string is used. The translated string should contain the placeholders appropriately placed in the same amount (and there should be no space between `@` and the number). However, I don't think you would find any in the German translation in particular.

Ah, thank you, I think I now understand! :-)

Hope I can post the corrected versions here:

./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr, lines 90 and 91

The number you have entered (@1) is too big, it must be at most @2.=Die eingegebene Zahl (@1) ist zu groß, maximal ist @2 erlaubt.
The number you have entered (@1) is too small, it must be at least @2.=Die eingegebene Zahl (@1) ist zu klein, minimal ist @2 erlaubt.

Not sure about this one:
./mods/HELP/mcl_doc/locale/mcl_doc.de.tr, line 54

, =, 

But I found and fixed in line 53:

This blocks drops the following when mined by shears: @1=Dieser Block wird folgendes abwerfen, wenn er mit einer Schere abgebaut wird: @1

I think the next one is a false positive, seems okay to me:

./mods/HUD/awards/locale/awards.de.tr, line 4

@1’s awards:=Auszeichnungen von @1:

The achievements file is incomplete. If the English template locale/translations file is complete, I may be able to add the missing translations later today.

Ah, thank you, I think I now understand! :-) Hope I can post the corrected versions here: ./mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr, lines 90 and 91 ``` The number you have entered (@1) is too big, it must be at most @2.=Die eingegebene Zahl (@1) ist zu groß, maximal ist @2 erlaubt. The number you have entered (@1) is too small, it must be at least @2.=Die eingegebene Zahl (@1) ist zu klein, minimal ist @2 erlaubt. ``` Not sure about this one: ./mods/HELP/mcl_doc/locale/mcl_doc.de.tr, line 54 ``` , =, ``` But I found and fixed in line 53: ``` This blocks drops the following when mined by shears: @1=Dieser Block wird folgendes abwerfen, wenn er mit einer Schere abgebaut wird: @1 ``` I think the next one is a false positive, seems okay to me: ./mods/HUD/awards/locale/awards.de.tr, line 4 ``` @1’s awards:=Auszeichnungen von @1: ``` The achievements file is incomplete. If the English template locale/translations file is complete, I may be able to add the missing translations later today.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#3540
No description provided.