Page tree

  • In JS and PHP Source Code we use German text, this is not perfect, but out of historical reasons we have to proceed this way
  • Only in JS source code, we use the #UT# Prefix, since all JS strings are overwritten in the several "localizedstrings.phtml" files.
  • In the localizedstrings.phtml files, there must not be any '#UT#', this is just a marker not to forget a string from the frontend source code in the localizedstrings.phtml.
  • Technically the "#UT#" text in the JS files can differ from the corresponding string in the localizedstrings.phtml, since only the values in localizedstrings.phtml are technically relevant. But for a convention, we try to keep the texts in sync.
  • When you open the application in English, and you receive German texts, this means the translation is missing.
  • If you see #UT# strings (or a missing string at all) in the application this means that the entry in localizedstrings.phtml is missing
  • Missing translations are tracked in "./data/cache/notFoundTranslation*.xliff" files
     the here added transunits has to be applied manually in our delivered xliff files
  • Translation of core code is added in:
    ./application/modules/editor/locales/de.xliff
    ./application/modules/editor/locales/en.xliff
  • Translation of Plug-In code is added in:
    ./application/modules/editor/Plugins/PLUGIN_FOLDER/locales/de.xliff
    ./application/modules/editor/Plugins/PLUGIN_FOLDER/locales/en.xliff
  • Currently, we deliver de and en translations only, although strings in the Source Code are in German, we have to fill the de.xliff files additionally.
  • Translation in en.xliff files must be done manually

The following tool can be used to generate transunits out of german text. The english texts are searched for similar already existing translations and provided as transunit too. The english proposal must be manually proof read.

http://www.translate5.net/editor/index/makexliff


Format of the trans-units

The trans-units in

./application/modules/editor/locales/de.xliff

./application/modules/default/locales/de.xliff

should be all in one line! Since this files are automatically generated, the format gets lost and that results in several unwanted git changes.

For all other xliff files this is not necessary and the XML could be intended.


Translation(xliff) file example:

<?xml version="1.0"?>
	<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
		<file original="php-sourcecode" source-language="de" target-language="en" datatype="php">
			<body>
				<trans-unit id="V2VpdGVy">
					<source>Weiter</source>
					<target>Continue</target>
				</trans-unit>
			</body>
		</file>
</xliff>

The transunit-ID should contain the base64-encoded source-string als used in the php source-code. This ID is used for matching.

  • No labels