Opened 5 years ago
Last modified 5 years ago
#19575 new defect
Missing translation test needs tweaks
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core validator | Version: | latest |
Keywords: | template_report | Cc: |
Description
Please, find attached example file, with two relations with same tags but only one does trigger the bug
What steps will reproduce the problem?
- Have language set to default and system setting
en_US
- Have a relation in Germany with
name
,name:de
andname:en
- Run Validator
What is the expected result?
No warning
What happens instead?
I get an informal warning:
Missing name:* translation - Missing name:*=AST 21: Horben Rathaus => Dorfstraße. Add tag with correct language key.
Please provide any additional information below. Attach a screenshot if possible.
Maybe, the two capital letters trigger this as for the other relation you do not get the warning
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-07-21 21:39:54 +0200 (Tue, 21 Jul 2020) Revision:16801 Build-Date:2020-07-22 01:30:52 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (1)
Change History (9)
by , 5 years ago
Attachment: | josm_validator_name_trans_bug.osm.xz added |
---|
follow-up: 2 comment:1 by , 5 years ago
Difference between the two relations is that name and name:de for relation 10621621 are equal while relation 10621618 has different strings. I think this is what the test is about.
comment:2 by , 5 years ago
Replying to GerdP:
Difference between the two relations is that name and name:de for relation 10621621 are equal while relation 10621618 has different strings. I think this is what the test is about.
Sorry, but you are wrong. This test is about missing translation for name
and should be triggered id any name:[LANG]=*
exists but no translation for it in the language JOSM is run with. It should not check the values at all and it is common to have the same name in some language for objects where we do not omnit name:[LANG]=*
if it is has the same value as name=*
.
Note that the relation without the duplicate values (first one below) triggers the warning.
<relation id='10621618'> <tag k='name' v='AST 21: Horben Rathaus => Dorfstraße' /> <tag k='name:de' v='Anruf-Sammeltaxi 21: Horben Rathaus => Dorfstraße' /> <tag k='name:en' v='Call-Share_taxi 21: Horben Rathaus => Dorfstraße' />
<relation id='10621621'> <tag k='name' v='Sammeltaxi 21: Horben Rathaus => Schauinslandbahn Talstation => Dorfstraße' /> <tag k='name:de' v='Sammeltaxi 21: Horben Rathaus => Schauinslandbahn Talstation => Dorfstraße' /> <tag k='name:en' v='Share_taxi 21: Horben Rathaus => Schauinslandbahn Talstation => Dorfstraße' />
follow-up: 4 comment:3 by , 5 years ago
This is a comment in the source NameMismatch.java:
* This test finds multilingual objects whose 'name' attribute is not * equal to any 'name:*' attribute and not a composition of some * 'name:*' attributes separated by ' - '.
comment:4 by , 5 years ago
Replying to GerdP:
This is a comment in the source NameMismatch.java:
* This test finds multilingual objects whose 'name' attribute is not * equal to any 'name:*' attribute and not a composition of some * 'name:*' attributes separated by ' - '.
Then the message is completely wrong and the suggestion, too. There is no missing tag and the name for the language exists but Validator does not like the values. This is something different.
I often use like this:
<tag k='name' v='Spielvereinigung Blutige Socken 1884' /> <tag k='name:de' v='SpVgg Blutige Socken `84' />
and thought the Validator warning is about a missing name:en=*
. Do I have to use short_name
and short_name:[LANG]
, as well?
follow-up: 7 comment:6 by , 5 years ago
Maybe JOSM can use the data in Territories to find out that name should contain the same string as name:de when the relation is inside Germany? In that case the message text should say something like
name and name:de should be equal
No idea what to use when the country code is not clear (e.g. for a route relation like E 55)
comment:7 by , 5 years ago
Replying to GerdP:
Maybe JOSM can use the data in Territories to find out that
name
should contain the same string asname:de
when the relation is inside Germany? In that case the message text should say something like
name and name:de should be equal
Values of `name` and `name:de` are not equal.
It is only an informal warning, so nothing should be demanded.
No idea what to use when the country code is not clear (e.g. for a route relation like E 55)
That is a general problem.
How to handle this situation in Switzerland with four official languages?
Any route
crossing a language boarder has this problem.
I am not convinced of this test at all.
comment:8 by , 5 years ago
Oh name:*
finds too many false positive. I find objects with dialect names name:gsw=*
and other extensions like name:Maps4BW=*
. So please, only warn for official languages' abbreviations.
example file containing two relations