Opened 10 years ago

Closed 6 years ago

#1643 closed enhancement (wontfix)

Better support for non-english/multi-lang areas

Reported by: tal.bav@… Owned by: osm@…
Priority: major Milestone:
Component: osmarender Version:
Keywords: name language Cc:

Description

I request two features.

Feature 1: Add a "preferedLanguages" parameter which lists (most desired first, least desired last) the languages to use when using text tags (such as "name").

example:

assume preferedLanguages=":en,:de,,:he"

when osmarenderer need a "name" tag, it will use the first available tag of the following:

name:en,name:de,name,name:he


Feature 2: Support making one tag be exactly the same as another tag using the following construct:

  name:he="hebrew text"
  name="$(name:he)"

Note, no need to support name="123 $(name:he) 456". Just allow one tag to have the value of another.


The purpose of feature 1, is better and easier rendering of maps with custom languages.

The purpose of feature 2, is not to repeat the same name twice in areas that always use name:xx in addition to the name tag. For example, currently in Israel we use at least "name:he","name:en" and "name". And generally, "name"="name:he". The main reason we need a "name" tag at all, is the Slippy Map on the main OSM site.

Attachments (2)

ticket-1643-multilang.patch (8.6 KB) - added by tal.bav@… 10 years ago.
add preferredLanguages variable support. add indirect text labels tags support.
ticket-1643-multilang-noexpansion.patch (4.4 KB) - added by Knut Arne Bjørndal 10 years ago.
Variant of the patch from Tal without the expansion feature

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by tal.bav@…

Attachment: ticket-1643-multilang.patch added

add preferredLanguages variable support. add indirect text labels tags support.

comment:1 Changed 10 years ago by tal.bav@…

More info about attachment:"ticket-1643-multilang.patch"

For each rule that displays text (text,areaText,caption,pathText), the key name of the text tag to be displayed is given in a "k" attribute. For example:

<pathText k="name" dy="2px" class="piste-downhill-name" text-anchor="middle" startOffset="75%"/>

In this example k="name". Now when osmarender wants to retrive the value of the "name" attribute for a specific way/node, it will:

  1. Get an initial value from by using preferedLanguages as described in the bug description for Feature 1.
  2. While the value from the previous step is "$(xxx)": get the value of key "xxx" (ignoring preferedLanguages), and goto step 2. (after 10 times, give up and return an error string, to avoid stack overflow)

comment:2 Changed 10 years ago by randomjunk

Please ignore Feature 2.

It's completely backwards incompatible for any renderer/user that doesn't support it (there are a lot by the way) and unnecessary. See mailing list thread on this subject for some other ways to achieve the requirements.

Changed 10 years ago by Knut Arne Bjørndal

Variant of the patch from Tal without the expansion feature

comment:3 in reply to:  2 ; Changed 10 years ago by Knut Arne Bjørndal

Replying to randomjunk:

Please ignore Feature 2.

It's completely backwards incompatible for any renderer/user that doesn't support it (there are a lot by the way) and unnecessary. See mailing list thread on this subject for some other ways to achieve the requirements.

I completely agree.

I've attached a patch modified to not have the expansion feature (and also omitted some whitespace changes and other junk).

PS: it seems trac doesn't like the diff, there are changes to two files in there.

comment:4 in reply to:  3 Changed 10 years ago by tal.bav@…

Replying to bob@cakebox.net:

Replying to randomjunk:

Please ignore Feature 2.

It's completely backwards incompatible for any renderer/user that doesn't support it (there are a lot by the way) and unnecessary. See mailing list thread on this subject for some other ways to achieve the requirements.

I completely agree.

I do not agree :) However, I agree to remove Feature 2 from this patch and to further discuss it on the talk mailing list. Maybe we can all agree upon something.

comment:5 Changed 6 years ago by iandees

Resolution: wontfix
Status: newclosed

Cleaning aging tickets.

Note: See TracTickets for help on using tickets.