(svn r27367) -Codechange: make a distinction between the layouting part of ICU (lx) or the sorting/collation part of ICU (i18n)
This commit is contained in:
@@ -49,9 +49,9 @@ const LanguageMetadata *_current_language = NULL; ///< The currently loaded lang
|
||||
|
||||
TextDirection _current_text_dir; ///< Text direction of the currently selected language.
|
||||
|
||||
#ifdef WITH_ICU
|
||||
#ifdef WITH_ICU_SORT
|
||||
Collator *_current_collator = NULL; ///< Collator for the language currently in use.
|
||||
#endif /* WITH_ICU */
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
||||
static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters
|
||||
@@ -1790,7 +1790,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
strecpy(_config_language_file, c_file, lastof(_config_language_file));
|
||||
SetCurrentGrfLangID(_current_language->newgrflangid);
|
||||
|
||||
#ifdef WITH_ICU
|
||||
#ifdef WITH_ICU_SORT
|
||||
/* Delete previous collator. */
|
||||
if (_current_collator != NULL) {
|
||||
delete _current_collator;
|
||||
@@ -1807,7 +1807,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
delete _current_collator;
|
||||
_current_collator = NULL;
|
||||
}
|
||||
#endif /* WITH_ICU */
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
/* Some lists need to be sorted again after a language change. */
|
||||
ReconsiderGameScriptLanguage();
|
||||
@@ -2132,7 +2132,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
|
||||
/* Update the font with cache */
|
||||
LoadStringWidthTable(searcher->Monospace());
|
||||
|
||||
#if !defined(WITH_ICU)
|
||||
#if !defined(WITH_ICU_LAYOUT)
|
||||
/*
|
||||
* For right-to-left languages we need the ICU library. If
|
||||
* we do not have support for that library we warn the user
|
||||
@@ -2152,5 +2152,5 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
|
||||
SetDParamStr(0, err_str);
|
||||
ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
|
||||
}
|
||||
#endif
|
||||
#endif /* !WITH_ICU_LAYOUT */
|
||||
}
|
||||
|
Reference in New Issue
Block a user