Opened 4 months ago

Last modified 3 months ago

#17173 closed enhancement

[Patch] Detect preset wiki languages automatically — at Initial Version

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 19.01
Component: Internal preset Version:
Keywords: Cc: Don-vip, michael2402, stoecker, naoliv, Simon, Poole


Instead of maintaining various OSM wiki languages in defaultpresets.xml, maintaining, running from time to time, still applying manual changes (cf. #17171), let JOSM detect the wiki language automatically. This features has been implemented long ago in HelpAction.displayHelp: it opens[lang]:[page] if it exists and falls back to[page].

So in a nutshell …

  • data/defaultpresets.xml

    diff --git a/data/defaultpresets.xml b/data/defaultpresets.xml
    index b88f3d9d4..0ec763ca8 100644
    a b  
    326326        <reference ref="voltage_frequency" />
    327327    </chunk>
    328328    <chunk id="power_generator">
    329         <link href=""
    330                   cs.href=""
    331                   de.href=""
    332                   es.href=""
    333                   fr.href=""
    334                   it.href=""
    335                   ja.href=""
    336                   pl.href=""
    337                   pt.href=""
    338                   ru.href="" />
     329        <link wiki="Tag:power=generator" />
    339330        <space />
    340331        <key key="power" value="generator" />
    341332        <reference ref="name_ref_operator" />

In total: 719 insertions(+), 5651 deletions(-)

Change History (1)

Changed 4 months ago by simon04

Attachment: 17173.patch.gz added
Note: See TracTickets for help on using tickets.