02/21: Editing the Reference Language

February 21, 2010

Up to some weeks ago I have always been convinced that it is absolutely not necessary to be able to edit the reference language from within the Localization Manager. This makes the process very clear: “We create all localizations from the reference files and only read those. We won’t touch them even if you’d want us to.”

However, this has changed. Some users came up to me and requested the ability to edit the english (reference) strings from the outside. They have their localizations sent to a professional agency and they tend to find typos in the english strings. Instead of them having to go into each file and look for the occurrence, they wanted to be able to import a mono-lingual strings file that came from the agency and automatically have their typos fixed.

Only very few may know, that solving this issue is quite an issue. The problem was that the Loc-Suite had only one dirty state for the reference language. But now we’d need two: when the contents in the file were modified, imported and need to be written to all other languages and when the reference language was changed in the database. As you might imagine, from a developers experience, splitting such a fundamental and central state is a very sensitive change. Luckily it was not overly much code to change, but still it was a lot of code to check that it worked right. Luckily I got unit tests ;)

The short message is: it’s in there. From the next nightly build on, you will be able to edit the reference language right from the Localization Manager. This function is not yet in the Localizer. Makes few sense there, I think — send me a message if you feel you need this.

When you now have a look at the change status of your files in the manager, you might get a a little cumbersome picture:

This means that the reference language was changed in two ways: the file was modified and the changes have been imported (thus the “Reference”) and the developer edited some of the strings in the Manager (thus the “English”). What will happen now? As the reference changed, first all other languages will be written. After that is finished, the reference file will be updated and immediately rescanned again. The rescan is more or less a security and convenience concern.

That’s it for today. Have a nice weekend!
Max

Fatal error: Call to undefined function the_flattr_permalink() in /home/wordcrafts/sites/www.loc-suite.org/public_html/blog/wp-content/themes/locsuite/single.php on line 26