Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a6f16943
Kaydet (Commit)
a6f16943
authored
Nis 10, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use language tags
Change-Id: I0e0e6f05f69a173d230a32bc1c39a1bf18fc052f
üst
d91b76bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
32 deletions
+11
-32
localedatawrapper.cxx
unotools/source/i18n/localedatawrapper.cxx
+11
-32
No files found.
unotools/source/i18n/localedatawrapper.cxx
Dosyayı görüntüle @
a6f16943
...
@@ -146,6 +146,8 @@ void LocaleDataWrapper::invalidateData()
...
@@ -146,6 +146,8 @@ void LocaleDataWrapper::invalidateData()
}
}
/* FIXME-BCP47: locale data should provide a language tag instead that could be
* passed on. */
::
com
::
sun
::
star
::
i18n
::
LanguageCountryInfo
LocaleDataWrapper
::
getLanguageCountryInfo
()
const
::
com
::
sun
::
star
::
i18n
::
LanguageCountryInfo
LocaleDataWrapper
::
getLanguageCountryInfo
()
const
{
{
try
try
...
@@ -259,7 +261,7 @@ void LocaleDataWrapper::invalidateData()
...
@@ -259,7 +261,7 @@ void LocaleDataWrapper::invalidateData()
if
(
!
rInstalledLocales
.
getLength
()
)
if
(
!
rInstalledLocales
.
getLength
()
)
{
{
LocaleDataWrapper
aLDW
(
::
comphelper
::
getProcessComponentContext
(),
LanguageTag
(
lang
::
Locale
()
)
);
LocaleDataWrapper
aLDW
(
::
comphelper
::
getProcessComponentContext
(),
LanguageTag
(
LANGUAGE_SYSTEM
)
);
aLDW
.
getAllInstalledLocaleNames
();
aLDW
.
getAllInstalledLocaleNames
();
}
}
return
rInstalledLocales
;
return
rInstalledLocales
;
...
@@ -281,37 +283,14 @@ void LocaleDataWrapper::invalidateData()
...
@@ -281,37 +283,14 @@ void LocaleDataWrapper::invalidateData()
sal_Int32
nLanguages
=
0
;
sal_Int32
nLanguages
=
0
;
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
i
++
)
{
{
String
aDebugLocale
;
LanguageTag
aLanguageTag
(
xLoc
[
i
]
);
OUString
aDebugLocale
;
if
(
areChecksEnabled
())
if
(
areChecksEnabled
())
{
{
/* FIXME-BCP47: handle language tags! */
aDebugLocale
=
aLanguageTag
.
getBcp47
(
false
);
aDebugLocale
=
xLoc
[
i
].
Language
;
if
(
!
xLoc
[
i
].
Country
.
isEmpty
()
)
{
aDebugLocale
+=
'-'
;
aDebugLocale
+=
String
(
xLoc
[
i
].
Country
);
if
(
!
xLoc
[
i
].
Variant
.
isEmpty
()
)
{
aDebugLocale
+=
'-'
;
aDebugLocale
+=
String
(
xLoc
[
i
].
Variant
);
}
}
}
if
(
!
xLoc
[
i
].
Variant
.
isEmpty
()
)
{
if
(
areChecksEnabled
())
{
OUStringBuffer
aMsg
(
"LocaleDataWrapper::getInstalledLanguageTypes: Variants not supported, locale
\n
"
);
aMsg
.
append
(
aDebugLocale
);
outputCheckMessage
(
aMsg
.
makeStringAndClear
());
}
continue
;
}
}
LanguageTag
aLanguageTag
(
xLoc
[
i
]
);
LanguageType
eLang
=
aLanguageTag
.
getLanguageType
();
// In checks, exclude known problems because no MS-LCID defined.
LanguageType
eLang
=
aLanguageTag
.
getLanguageType
(
false
);
if
(
areChecksEnabled
()
&&
eLang
==
LANGUAGE_DONTKNOW
)
if
(
areChecksEnabled
()
&&
eLang
==
LANGUAGE_DONTKNOW
)
{
{
OUStringBuffer
aMsg
(
"ConvertIsoNamesToLanguage: unknown MS-LCID for locale
\n
"
);
OUStringBuffer
aMsg
(
"ConvertIsoNamesToLanguage: unknown MS-LCID for locale
\n
"
);
...
@@ -333,10 +312,10 @@ void LocaleDataWrapper::invalidateData()
...
@@ -333,10 +312,10 @@ void LocaleDataWrapper::invalidateData()
// In checks, exclude known problems because no MS-LCID defined
// In checks, exclude known problems because no MS-LCID defined
// and default for Language found.
// and default for Language found.
if
(
areChecksEnabled
()
if
(
areChecksEnabled
()
&&
!
aDebugLocale
.
EqualsAscii
(
"ar-SD"
)
// Sudan/ar
&&
aDebugLocale
!=
"ar-SD"
// Sudan/ar
&&
!
aDebugLocale
.
EqualsAscii
(
"en-CB"
)
// Carribean is not a country
&&
aDebugLocale
!=
"en-CB"
// Carribean is not a country
// &&
!aDebugLocale.EqualsAscii( "en-BG" )
// ?!? Bulgaria/en
// &&
aDebugLocale != "en-BG"
// ?!? Bulgaria/en
// &&
!aDebugLocale.EqualsAscii( "es-BR" )
// ?!? Brazil/es
// &&
aDebugLocale != "es-BR"
// ?!? Brazil/es
)
)
{
{
OUStringBuffer
aMsg
(
"ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)
\n
"
);
OUStringBuffer
aMsg
(
"ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment