Hello Francois,
before I start: my comment below in no way implies that option 4 is the way to go.
On 09/12/2011 07:28 PM, Francois Gouget wrote:
Option 4 - Put the sizes in special PO files
This would really be a very ugly hack. Like option 2 it requires that every control of a given dialog have a unique id. Then for each of them we would create PO file entries of the form:
msgctxt "<rc-filename>:<dialog-id>:<control-id>" msgid "<x>:<y>:<width>:<height>" msgstr ""
You wouldn't need a special PO file. You could put that info into a comment of the respective entry to translate using the "#." comment. http://www.gnu.org/s/hello/manual/gettext/PO-Files.html says: "Comment lines starting with #. contain comments given by the programmer, directed at the translator; these comments are called extracted comments because the xgettext program extracts them from the program's source code."
This would avoid separate files, unique IDs for all the entries and would be visible to the translator.
bye michael
We then put all these 'messages' in a sizes-<lang>.po file. Whenever a control needs to be resized a 'translation' would be provided in the relevant sizes-<lang>.po file.
We would only keep the English RC file and when compiling the resources for a given language wrc would check whether the sizes-<lang>.po file contains a translation of the size data for the current control.
Pros:
- Maybe the easiest solution to put in place.
Cons:
Totally ugly.
Probably awful to work with to change the layout of a dialog.
All the drawbacks of Option 2.