gnustep-dev
[Top][All Lists]
Advanced

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

Localization


From: Nicola Pero
Subject: Localization
Date: Thu, 22 Feb 2001 23:35:39 +0000 (GMT)

I've added three macros to NSBundle.h to support localizing quickly
stuff.  I'm localizing as in _(@"Game Over") - it looks like the
simplest way.  Gomoku can already run in Italian and when we agree the
macros are Ok that way, I will release the new Gomoku. :-)

The problem is we still miss a tool which can parse the code and
extract the strings to localize.  Anyway - as a quick start, it is
possible to localize stuff manually now.  Btw - how do we localize the
libraries ?  I think the gui needs to be localized - for example when
it prints out the message `Help Panel not implemented yet' - we need
to localize that message.  How do I do that ?  While bundles seem to
have support for localization, libraries do not.

In the past days I had some brief thought about implementing the tool
- but actually it's not so trivial.  

Before trying to extract the localizable strings, we need to
preprocess the files using the preprocessor, so that standard macros
are processed.  When we process the file in this way, we don't want
the localization macros to be collapsed in the normal way though!  We
can achieve this by protecting the definition of the localization
macros with #ifndef GNUSTEP_EXTRACT_LOCALIZATION_MACROS and then pass
-DGNUSTEP_EXTRACT_LOCALIZATION_MACROS to the preprocessor.  After this
step, we need a tool to parse the whole source code, look for the
localization macros, and extract the strings to localize, with the
comments.  To help with this step, we could even redefine the
localization macros to expand to some unmistakable marker - but I'm
not sure that would help so much.  The tool must then be able to
output a Localizable.strings file.

And that would not be enough.  Translations need to be updated!  We
need yet another tool, which can take the new Localizable.strings file
- with the translation yet to do, and an old Localizable.strings file
already translated, and reinsert the old translations in the new file
- leaving blank the new strings to be translated.

Any comments ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]