include language-only in ISO-only fallback strings

Change-Id: I6da1b2b46c724c72bff3b1ee9739f2625a0321c2
This commit is contained in:
Eike Rathke
2013-09-10 19:16:33 +02:00
parent 486353651a
commit 7dc7d77cd0
2 changed files with 6 additions and 0 deletions

View File

@@ -209,6 +209,11 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT( de_DE.getCountry() == "DE" );
CPPUNIT_ASSERT( de_DE.getScript() == "" );
CPPUNIT_ASSERT( de_DE.getLanguageAndScript() == "de" );
::std::vector< OUString > de_DE_Fallbacks( de_DE.getFallbackStrings( true));
CPPUNIT_ASSERT( de_DE_Fallbacks.size() == 2);
CPPUNIT_ASSERT( de_DE_Fallbacks[0] == "de-DE");
CPPUNIT_ASSERT( de_DE_Fallbacks[1] == "de");
CPPUNIT_ASSERT( de_DE.makeFallback().getBcp47() == "de-DE");
}
{

View File

@@ -1238,6 +1238,7 @@ LanguageTag & LanguageTag::makeFallback()
else if (aCountry != "CN")
aVec.push_back( aLanguage + "-CN");
}
aVec.push_back( aLanguage);
}
else if (bIncludeFullBcp47)
aVec.push_back( aLanguage);