Modify

Opened 9 months ago

Last modified 9 months 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?

  1. Have language set to default and system setting en_US
  2. Have a relation in Germany with name, name:de and name:en
  3. 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)

josm_validator_name_trans_bug.osm.xz (1.4 KB) - added by skyper 9 months ago.
example file containing two relations

Download all attachments as: .zip

Change History (9)

Changed 9 months ago by skyper

example file containing two relations

comment:1 Changed 9 months ago by 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.

comment:2 in reply to:  1 Changed 9 months ago by skyper

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 =&gt; Dorfstraße' />
    <tag k='name:de' v='Anruf-Sammeltaxi 21: Horben Rathaus =&gt; Dorfstraße' />
    <tag k='name:en' v='Call-Share_taxi 21: Horben Rathaus =&gt; Dorfstraße' />
  <relation id='10621621'>
    <tag k='name' v='Sammeltaxi 21: Horben Rathaus =&gt; Schauinslandbahn Talstation =&gt; Dorfstraße' />
    <tag k='name:de' v='Sammeltaxi 21: Horben Rathaus =&gt; Schauinslandbahn Talstation =&gt; Dorfstraße' />
    <tag k='name:en' v='Share_taxi 21: Horben Rathaus =&gt; Schauinslandbahn Talstation =&gt; Dorfstraße' />

comment:3 Changed 9 months ago by 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 ' - '.

comment:4 in reply to:  3 Changed 9 months ago by skyper

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?

comment:5 Changed 9 months ago by GerdP

I agree the text is confusing. See also #9242.

comment:6 Changed 9 months ago by GerdP

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 in reply to:  6 Changed 9 months ago by skyper

Replying to GerdP:

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

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 Changed 9 months ago by skyper

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.