Modify

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?

  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 5 years ago.
example file containing two relations

Download all attachments as: .zip

Change History (9)

by skyper, 5 years ago

example file containing two relations

comment:1 by GerdP, 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.

in reply to:  1 comment:2 by skyper, 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 =&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 by GerdP, 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 ' - '.

in reply to:  3 comment:4 by skyper, 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?

comment:5 by GerdP, 5 years ago

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

comment:6 by GerdP, 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)

in reply to:  6 comment:7 by skyper, 5 years ago

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 by skyper, 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.

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.