Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translatable strings for payment types #255

Merged
merged 8 commits into from
Oct 13, 2022

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Oct 23, 2021

Added human-readable, translatable strings for the most common payment types that are documented on the payment key’s wiki page. There are a great many payment:* subkeys, including plenty that are valid but undocumented, but this PR doesn’t attempt to enumerate them all. The subkeys omitted from this PR will continue to appear in the menu but as a raw value rather than a pretty-printed one.

I included most subkeys used at least 1,000 times according to taginfo. However, I omitted the following subkeys based on guidance on the wiki:

  • none is discouraged because setting it to yes ambiguously means free of charge (fee=no) or cannot be purchased.
  • others has to be set to no, but the multiCombo field type only allows subkeys to be tagged yes.
  • bitcoin and bitcoincash are discouraged in favor of the currency:XBT and currency:BCH keys, respectively.
  • mobile_phone is ambiguous; it variously means phone, sms, or app.

It remains possible to tag these subkeys, since the multiCombo field is freeform, but the field wouldn’t encourage the use of these subkeys.

Comment on lines +30 to +32
"ep_easycard": "悠遊卡EasyCard",
"ep_geldkarte": "GeldKarte",
"ep_ipass": "iPASS一卡通",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings for Taiwan’s ep_easycard and ep_ipass systems include the official Chinese name to avoid confusion with the Easy Card and I-PASS systems in the United States.

"apple_pay": "Apple Pay",
"bancomat": "Bancomat",
"blik": "Blik",
"clipper": "Clipper",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These labels may seem trivial, but they’re properly capitalized to make the raw key look more presentable, and some of these brands have different official names in other languages or scripts.

@bryceco
Copy link

bryceco commented Oct 23, 2021

The subkeys omitted from this PR will continue to appear in the menu but as a raw value rather than a pretty-printed one.

Is that really how multiCombo works? It combines values from taginfo with the explicitly defined values?

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 23, 2021

It’s how the combo field type works, for example Surface:

surface

So far, no semiCombo field has had strings added to it, so I’m not 100% certain what’ll happen, but I’d expect it to behave similarly. However, I noticed that iD’s implementation of multiCombo doesn’t seem to be using the strings, for example Cuisine: #252 (comment). It might be related to the missing translations in openstreetmap/iD#8600.

@bryceco
Copy link

bryceco commented Oct 23, 2021

I was using the built-ins when available, or tagInfo if not, but didn't think to union them. Thanks!

@tyrasd tyrasd added the enhancement New feature or request label Dec 13, 2021
@tyrasd tyrasd force-pushed the main branch 2 times, most recently from 9d3204d to 49f529e Compare June 22, 2022 16:19
@tyrasd tyrasd added new-value and removed enhancement New feature or request labels Sep 29, 2022
@tyrasd tyrasd merged commit 257a89c into openstreetmap:main Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants