[jokosher-devel] Python-style Translations



From the ru.po file:
	754  	#: ../../Jokosher.py:464
  	755 	#, fuzzy, python-format
  	756 	msgid "Mixing project to file: %s"
  	757 	msgstr "Сведение проекта"

In python, %s means that there will be a string substitution. In this case %s represents the filename. So the user will see: "Mixing project to file: myfile.ogg". However in this Russian translation there is no %s. This is a problem because we have told python substitute a string, but it won't know where. This Russian string will could possible freeze Jokosher.

Translators: If you find any weird characters like this and don't know what they mean, either look in the code (it specifies Jokosher.py:464), or ask one of the devs to tell you what it means. We can look in the code for you and tell you exactly what will be substituted.

Developers: We should probably put info like this in the comments beside strings that contain %s, etc.

	799  	#: ../../Jokosher.py:678
  	800 	#, fuzzy, python-format
  	801 	msgid "%s - Jokosher"
  	802 	msgstr "Добро пожаловать в Jokosher!"

This one is the same; it is used for the window title and the project name will be substituted to become "MyProject.jokosher - Jokosher". Maybe this one shouldn't be translated at all.

Note that %s means string substitution and %d means number substitution. This allows you to move the numbers to wherever is syntactically correct in your language - as long as any multiple substitutions appear in the same order as in english. If you require a different order, please ask a developer and we can make it possible.

	763  	#: ../../Jokosher.py:485
  	764 	#, python-format
  	765 	msgid "%d of %d seconds completed"

In the program this will appear as "10 of 25 seconds completed". If the string we're translated to "%d total; %d completed", it would then appear as "10 total; 25 completed" because of the order of numbers in the code. This however is incorrect because the numbers should be swapped. Please try to avoid this, but it can be changed if your language absolutely requires it.

Thanks for all the translations!

Laszlo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]