[Issue#] N/A
[Cause] N/A
[Problem] Following W3C Spec. default "en"
language tag is not needed.
[Solution] Default English language tag removed
[Verification] Use localized for English language with
system set to other one or launch wrt-tests-miscunit
tests from this commit:
http://slp-info.sec.samsung.net/gerrit/#/c/121844/
and check wheteher LanguageTagsProvider tests pass
Change-Id: Ic9231a2adc4c559cbaca8e9942c815d6206e6996
void LanguageTagsProvider::setLanguageTags(const LanguageTags& taglist)
{
m_languageTagsList = taglist;
void LanguageTagsProvider::setLanguageTags(const LanguageTags& taglist)
{
m_languageTagsList = taglist;
- /* If given list does not contain default values ("en" and empty string)
- * than append them to the list.
- * In case of empty list given as parameter only two default values
+ /* If given list does not contain default value (empty string)
+ * than append it to the list.
+ * In case of empty list given as parameter only default value
* will exist on m_languageTagsList. */
* will exist on m_languageTagsList. */
- DPL::String tofind = L"en";
- if(std::find(m_languageTagsList.begin(), m_languageTagsList.end(),
- tofind) == m_languageTagsList.end()) {
- m_languageTagsList.push_back(L"en");
- }
- tofind = L"";
+ DPL::String tofind = L"";
if(std::find(m_languageTagsList.begin(), m_languageTagsList.end(),
tofind) == m_languageTagsList.end()) {
m_languageTagsList.push_back(L"");
if(std::find(m_languageTagsList.begin(), m_languageTagsList.end(),
tofind) == m_languageTagsList.end()) {
m_languageTagsList.push_back(L"");
LogDebug("Setting default language tags");
/* If NULL language given than set default language tags
* and return. */
LogDebug("Setting default language tags");
/* If NULL language given than set default language tags
* and return. */
- m_languageTagsList.push_back(L"en");
m_languageTagsList.push_back(L"");
return;
}
m_languageTagsList.push_back(L"");
return;
}
langdescr = langdescr.substr(0, position);
}
}
langdescr = langdescr.substr(0, position);
}
}
- /* If current content of langdescr (thus last added added tag)
- * is not "en" then add english as default locales.
- * "en" and empty tag are added even when langdescr is not valid. */
- if (langdescr.compare(L"en") != 0){
- m_languageTagsList.push_back(L"en");
- }
/* Add empty tag for non-localized content */
m_languageTagsList.push_back(L"");
}
/* Add empty tag for non-localized content */
m_languageTagsList.push_back(L"");
}