summaryrefslogtreecommitdiff
path: root/shell/source/tools
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-11-24 14:40:24 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-11-24 14:40:24 +0000
commit2c993660864d3e0ac89d9a88155827eaa88ecef5 (patch)
tree850f7dcecd1c6e6aeebb8b5948f36edac336e90f /shell/source/tools
parentef1ec7001a06a6ba0fdbed702bcd7a6fec58eaf9 (diff)
CWS-TOOLING: integrate CWS localization37
2009-11-20 17:34:04 +0100 ihi r277585 : not yet the best solution 2009-11-19 14:34:34 +0100 ihi r277560 : #i103247# updated Luxembourgish autocorrect data 2009-11-16 16:58:56 +0100 ihi r277525 : added ast to no_ms_lang 2009-11-16 16:57:23 +0100 ihi r277524 : added ast 2009-11-16 16:41:22 +0100 ihi r277523 : #i106900# updated identifier ShowAnnotation -> ShowAnnotations 2009-11-16 16:39:34 +0100 ihi r277522 : small helper script 2009-11-16 15:24:34 +0100 ihi r277520 : Fixed german and removed ln ti pap ur 2009-11-11 14:27:38 +0100 releng r277457 : added ug, om, si, oc, or, ml, as to non ms langs 2009-11-11 14:23:30 +0100 releng r277456 : Fix for merging more then just one 2009-11-11 14:12:52 +0100 ihi r277455 : #i106775# Merge of OOo 3.2 l10n cws localization37 nb nn he ga uk my bg ja uz fi bn kid fr nl vi ca pt-BR ru ka oc gl cs km kn ko sh si om gu sk sl zh-CN ku or da sr de sv hi-IN pa-IN ta te pl th hu dz lv pt tr en-GB id el ar as eo es ml et eu zh-TW is ug it mr 2009-11-05 23:07:09 +0100 ihi r277375 : added om kid , removed dupe ta-IN 2009-11-03 18:09:39 +0100 ihi r277327 : removed dupe 2009-11-02 19:02:55 +0100 ihi r277303 : #i105973 obsolete sdf files removed 2009-11-02 19:02:16 +0100 ihi r277302 : #i105973 obsolete sdf files removed 2009-10-13 19:19:06 +0200 ihi r276871 : CWS-TOOLING: rebase CWS localization37 to branches/OOO320@276773 (milestone: OOO320:m1) 2009-10-01 13:19:45 +0200 ihi r276598 : key -> ky ... this one triggered a bad crash in rsc 2009-09-09 17:02:20 +0200 ihi r276004 : added some langs 2009-09-09 13:17:16 +0200 ihi r275986 : lucky local cygwin fix 2009-09-03 18:47:45 +0200 ihi r275769 : #104328# deal with l10nless src files 2009-09-03 15:58:51 +0200 ihi r275760 : added some new langs 2009-09-03 15:54:16 +0200 ihi r275759 : old localize.pl tool used as a helper 2009-09-03 15:53:48 +0200 ihi r275758 : do not merge not wellformated sdf files 2009-09-03 15:51:59 +0200 ihi r275757 : old localize.pl tool used as a helper 2009-09-03 15:50:03 +0200 ihi r275756 : some small helpers added 2009-09-01 18:22:04 +0200 ihi r275681 : update DEV300 code line with OOO310 strings 2009-09-01 13:45:43 +0200 ihi r275658 : #i104680# prevent that self defined or dupe ms ids are merged
Diffstat (limited to 'shell/source/tools')
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx31
1 files changed, 24 insertions, 7 deletions
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index 7f177233d7cc..43fbd410dbe3 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -65,6 +65,7 @@
#include <sstream>
#include <iterator>
#include <algorithm>
+#include <string>
namespace /* private */
{
@@ -324,6 +325,8 @@ private:
iso_lang_identifier active_iso_lang_;
};
+typedef std::map< unsigned short , std::string , std::less< unsigned short > > shortmap;
+
//###########################################
void add_group_entries(
Config& aConfig,
@@ -334,21 +337,35 @@ void add_group_entries(
aConfig.SetGroup(GroupName);
size_t key_count = aConfig.GetKeyCount();
+ shortmap map;
for (size_t i = 0; i < key_count; i++)
{
ByteString iso_lang = aConfig.GetKeyName(sal::static_int_cast<USHORT>(i));
ByteString key_value_utf8 = aConfig.ReadKey(sal::static_int_cast<USHORT>(i));
+ iso_lang_identifier myiso_lang( iso_lang );
+ LanguageType ltype = MsLangId::convertIsoNamesToLanguage(myiso_lang.language(), myiso_lang.country());
+ if( ( ltype & 0x0200 ) == 0 && map[ ltype ].empty() )
+ {
+ Substitutor.set_language(iso_lang_identifier(iso_lang));
- Substitutor.set_language(iso_lang_identifier(iso_lang));
-
- key_value_utf8.EraseLeadingAndTrailingChars('\"');
+ key_value_utf8.EraseLeadingAndTrailingChars('\"');
- OUString key_value_utf16 =
- rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
+ OUString key_value_utf16 =
+ rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
- Substitutor.add_substitution(
- GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16));
+ Substitutor.add_substitution(
+ GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16));
+ map[ static_cast<unsigned short>(ltype) ] = std::string( iso_lang.GetBuffer() );
+ }
+ else
+ {
+ if( !map[ ltype ].empty() )
+ {
+ printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", ltype , map[ ltype ].c_str() , iso_lang.GetBuffer());
+ exit( -1 );
+ }
+ }
}
}