-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Used nv-i18n library to add better support for iso639-2/T iso639-2/B support #5982
Used nv-i18n library to add better support for iso639-2/T iso639-2/B support #5982
Conversation
Will this solve the problem with the missing INSPIRE browse brick titles that contain Swedish characters? |
@matself This is mostly to standardize on the languages that do have different codes between T/B - i.e. fre/fra, slo/slk, der/deu... |
Ah well, one could always hope for a break. As a matter of fact, this is my major problem with Geonetwork right now. INSPIRE themes are an important feature.
Hälsning / Regards
Mats.E
Skickat från min / Sent from my iPad, Ursäkta att jag är kortfattad / Excuse my brevity.
… 5 okt. 2021 kl. 12:41 skrev Ian ***@***.***>:
@matself
I don't believe this will fix that problem as this fix is mostly to standardize the iso639-2/T iso639-2/B support. I see that Sweden is swe for both T and B so it should not be affected.
This is mostly to standardize on the languages that do have different codes between T/B - i.e. fre/fra, slo/slk, der/deu...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
core/src/main/java/org/fao/geonet/languages/IsoLanguagesMapper.java
Outdated
Show resolved
Hide resolved
Log.error(Geonet.GEONETWORK, "Failed to get iso 2 language code for " + iso3LangCode + " caused by " + ex.getMessage()); | ||
LanguageCode languageCode = LanguageCode.getByCode(iso3LangCode.toLowerCase()); | ||
if (languageCode != null) { | ||
iso2LangCode = languageCode.name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the previous code iso2LangCode
had the language 2 iso code. To confirm that this is what is returned by languageCode.name()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java
Outdated
Show resolved
Hide resolved
…_2B should have been used. Updated language parsing to support fr:can
@josegar74 |
Used nv-i18n library to add better support for iso639-2/T iso639-2/B support (geonetwork#5982) * Used nv-i18n library to add better support for iso639-2/T iso639-2/B support * Fixed bug where getAlpha3T and isoLanguagesMapper.iso639_2T_to_iso639_2B should have been used. Updated language parsing to support fr:can # Conflicts: # core/src/main/java/org/fao/geonet/util/XslUtil.java # pom.xml # services/src/main/java/org/fao/geonet/api/records/CatalogApi.java # services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java # services/src/main/java/org/fao/geonet/api/tools/i18n/LanguageUtils.java # services/src/main/java/org/fao/geonet/api/tools/i18n/TranslationApi.java
Used nv-i18n library to add better support for iso639-2/T iso639-2/B support (#5982) * Used nv-i18n library to add better support for iso639-2/T iso639-2/B support * Fixed bug where getAlpha3T and isoLanguagesMapper.iso639_2T_to_iso639_2B should have been used. Updated language parsing to support fr:can # Conflicts: # core/src/main/java/org/fao/geonet/util/XslUtil.java # pom.xml # services/src/main/java/org/fao/geonet/api/records/CatalogApi.java # services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java # services/src/main/java/org/fao/geonet/api/tools/i18n/LanguageUtils.java # services/src/main/java/org/fao/geonet/api/tools/i18n/TranslationApi.java
I had noticed that there were a few cases where languages were being converted from iso639-2/T iso639-2/B but there were not handling all languages. Applied a new consistent converted using the nv-i18n library.