I have thought about localizing our messagetables, like kernel32's
errorcodes.mc
Now the question is: how do we do this?
We could simply add all localisations inside the current file without
changing anything else in the build process. I didn't test if it works,
but it should. But it would lead to huge files full of different
languages and would also remove the possibility for custom selection of
the languages that are compiled.
I would prefer to go the way we do with other localisation: put
different .mc files in the lang subfolder. But afaik mc files don't
allow inclusion of external files, so we need some build process that
compiles the different mc files into rc files and include those into a
main rc file. Currently our mcs are defined in makefile. This should
move to the rbuild files and rbuild should compile the mc files and
create the needed rc:
<module...>
...
<file>foo.c</file>
<file>foo.rc</file>
...
<autoresource>auto.rc</autoresource>
<localization isoname="de-DE">lang/de-DE.rc</localization>
<msgtable isoname="de-DE">lang/msgtable-de-DE.mc</msgtable>
</module>
rbuild would generate <intermediate dir>\lang\msgtable-de-DE.mc.rc and
auto.rc containing includes to the generated files. IMO auto.rc should
be the file that is compiled, including all localizations and the
unlocalized resource file.
#include "lang/de-DE.rc"
#include "lang/msgtable-de-DE.mc.rc"
If I understood Fireball correctly, this is also msvc compatible. And
if not, rbuild just would have to generate the files differently.
Some ideas for simplifying the rbuild definitions: Instead of <file>,
<localization> and <msgtable> we could simply use <file> for
unconditional compilation, <file locale="en-US"> for localized
conditional compilation. And then let rbuild decide from the file
extension what to do with it. resources/messagetables could
automatically be included in an autogenerated rc file, without
explicitly defining it in the rbuild file.
Regards,
Timo