Feature #633

Core: The total size of i18n strings is quite extensive, consider compilation flag to leave only english and/or compression

Added by Miroslav Fidler about 10 years ago. Updated about 10 years ago.

Status:ApprovedStart date:01/06/2014
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:CoreSpent time:-
Target version:-

History

#1 Updated by Jan Dolinár about 10 years ago

IMHO limiting this to either all languages or only English is bit too restrictive. What about allowing user to choose arbitrary number of languages? It could be done simply by conditionally defining enUS, csCZ, etc. macros. Something like this in t.h:

#if defined(flagLANG_enUS) || defined(flagLANG_csCZ) || ...
    #define ONLY_SELECTED_LANGS 1
#else 
    #define ONLY_SELECTED_LANGS 0
#endif

#if defined(flagLANG_enUS) && !ONLY_SELECTED_LANGS
    #define enUS(text)  { LNGC_('E','N','U','S', CHARSET_UTF8), text },
#else
    #define enUS(text)
#endif
// etc. for other languages

#2 Updated by Jan Dolinár about 10 years ago

Well, the code in above post is obviously wrong... It should be:

#if defined(flagLANG_enUS) || defined(flagLANG_csCZ) || ...
    #define ALL_LANGS 0
#else 
    #define ALL_LANGS 1
#endif

#if defined(flagLANG_enUS) || ALL_LANGS
    #define enUS(text)  { LNGC_('E','N','U','S', CHARSET_UTF8), text },
#else
    #define enUS(text)
#endif
// etc. for other languages

#3 Updated by Miroslav Fidler about 10 years ago

IMO, you either want app i18n and want all language (in fact, what is 50kb?), or you are doing some system utility - and en-us is enough in that case.

#4 Updated by Jan Dolinár about 10 years ago

Simple U++ Core app is about 300kb, so 50kb is around 15% :-)

What if I want to have a command-line utility in Czech? Sure, I could write the Czech strings directly into application and it would mostly work fine, only the messages from within Core would be still in English.

By the way, don't pay to much attention to me here, I'm just playing the devils advocate, as usually ;-)

#5 Updated by Miroslav Fidler about 10 years ago

  • Status changed from New to Approved

For now implemented as NOI18N; I am willing to apply patch enabling individual languages, but at the moment it seems like a lot of work.

Also available in: Atom PDF