Open josegar74 opened 8 years ago
@fxprunayre Do you know about this behaviour?
a) Any idea why all elements except keywords language codes are changed to 2 iso letters?
b) Should be indicated to users to use only 2 iso letter codes for languages?
About a) probably is related to
doing a copy instead apply-templates, preventing to execute this template that is changing the language codes to 2 letters:
@fxprunayre Do you know about this behaviour?
Not really, was mainly done for geocat.ch.
a) Any idea why all elements except keywords language codes are changed to 2 iso letters?
I think locale codes should be preserved if existing (as they're no rules that the locale identifier is 2 letter code).
Ok, I removed the usage of java:twoCharLangCode
in:
And that seem preserving fine the existing values, will check a bit more with my customer and if all looks fine, will commit it.
We also probably need dedicated controls in the editor to properly add and remove a language (cf. #1488).
Ok, but that can be managed separately I guess.
Does it sound fine to commit the change to remove the usage java:twoCharLangCode in update-fixed-info.xsl
?:
Any test branch where we can test it ? I think this will introduce issues with keyword selection which is not aware of the mapping between lang code and locale ids.
So at least some work required here to pass a map of value for the lang parameter here.
Then for associated resources, it looks like lang ids are passed in parameters http://localhost:8080/geonetwork/srv/api/records/2172/processes/onlinesrc-add?url=http:%2F%2Flemonde.fr&protocol=&name=eng%23englis%7CFR%23francais&desc=&function=information&applicationProfile=app%20profile&process=onlinesrc-add&id=2172 so it may be fine for that.
@fxprunayre See branch with the fix. It's based on 3.0.x, but I plan to do a merge to 3.2.x soon of that branch. If you have time, please check about this fix.
@fxprunayre, any chance to test this?
@fxprunayre, any chance to test this?
It will not work if you don't change all places which assumes locale IDs are 2 letters upper case code eg.
So what to do:
1) Do you think should be changed all references to java:twoCharLangCode
and seem also some js code to keep the original ids?
2) Or should be better to add some xslt process to "fix" the metadata to use 2 iso letter codes?
The problem about the option 2) is that I'm not sure that will work, as seem some mixup between the UI language code (3 letters) and the metadata locales as described initially. Also not sure if it's nice to change the metadata from the users.
Attached metadata has some issues in metadata editor:
INSPIRE_Buildings_Service.txt
1) Language codes are changed from 3 iso letters to 2 iso letters. Not sure if this is a good behaviour, I guess should be not changed or at least clear which language codes should be used.
2) When switching to xml view and getting back to Default view, in the keywords appear some null entries
This looks related to 1) as all elements are changed to 2 iso letters, except the keywords that preserve the 3 iso letters, causing these null entries in the editor.
Before switching to XML view:
After switching to XML view: