desktop/source/lib/init.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 45a27e55d418422cf61ea3d4eed8eb5a6e309c90 Author: Henry Castro <hcas...@collabora.com> Date: Thu Dec 7 08:49:12 2017 -0400 lok: discard name languages not registered there is a STR_ARR_SVT_LANGUAGE_TABLE table that all language names are registered But not all, like locale "es" { LANGUAGE_SPANISH_LATIN_AMERICA, "es", "" , k0 } Avoid that names until get registered appropriately Change-Id: I148f2c30f72c82c978f5e9a1e977bf4b5e923a9c Reviewed-on: https://gerrit.libreoffice.org/46027 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 94afb956ebc7..2ea79a076e9a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2582,10 +2582,15 @@ static char* getLanguages(const char* pCommand) boost::property_tree::ptree aTree; aTree.put("commandName", pCommand); boost::property_tree::ptree aValues; + boost::property_tree::ptree aChild; + OUString sLanguage; for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ ) { - boost::property_tree::ptree aChild; - aChild.put("", SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])).toUtf8()); + sLanguage = SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])); + if (sLanguage.startsWith("{") && sLanguage.endsWith("}")) + continue; + + aChild.put("", sLanguage.toUtf8()); aValues.push_back(std::make_pair("", aChild)); } aTree.add_child("commandValues", aValues); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits