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 crops #257

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Translatable strings for crops #257

merged 1 commit into from
Oct 14, 2022

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Oct 28, 2021

Added translatable strings for the Crops field based on the most common documented values of the crop key used more than 100 times. I’ve omitted values that the documentation seems to discourage and picked the more common value wherever the documentation offers both as equally valid options. This list is not nearly as comprehensive as the crops-parser list, but that’s OK because these strings are only used to pretty-print the list of most common values in the database.

"grass": "Grass",
"hop": "Hops",
"lavender": "Lavender",
"maize": "Corn",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The wiki argues that maize is preferable to corn and marks corn as deprecated due to ambiguity. However, corn is orders of magnitude more common in the database, so it’ll show up toward the top of the list, untranslated, while this translated string appears much lower.

The source strings are in American English by default. The Australian English and New Zealand English localizations should keep this string unchanged. The British English and probably Indian English localizations will need to translate it to “Maize”.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The deprecation of crop=corn is being challenged on the tagging list. Regardless, this PR is merely also labeling crop=maize as “Corn” for the American English locale, which should be uncontroversial. (I grew up in a corn-producing area in the U.S. No one there knows what maize is, but everyone knows what a corn maze is.)

Copy link
Member

@tyrasd tyrasd Dec 13, 2021

Choose a reason for hiding this comment

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

merely also labeling crop=maize as “Corn”

One downside of this is that the list would contain two entries labeled as corn (once for the corn tag value itself and once for the translation of the maize value), with only slight differences in style and spelling… not ideal

PS: A similar issue exist for vegetable which is labeled as Vegetables, but vegetables is also a relatively often used value for the tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

If deprecation would be upheld maybe having Corn (old tagging) / Corn (deprecated) would be survivable?

Or maybe having some list of excluded values, blocked from appearing?

Maybe deprecation rule would be OK?

data/fields/crop.json Show resolved Hide resolved
Copy link
Member

@tyrasd tyrasd left a comment

Choose a reason for hiding this comment

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

omitted values that the documentation seems to discourage

I think we should document which these were, to avoid that at some time in the future we wonder why a certain value was not included in this list.

argues that maize is preferable to corn

See inline comment below.

used more than 100 times.

🤔 I'm not 100% sure if this is the right approach. One issue, for example, is that the list could become outdated relatively quickly (we would kind of need a way to monitor changes in usage of the tag). Wouldn't it make more sense to just use the list as on the OSM wiki (just excluding "discouraged" entries)? This would probably allow for easier syncing of future changes.

data/fields/crop.json Show resolved Hide resolved
"grass": "Grass",
"hop": "Hops",
"lavender": "Lavender",
"maize": "Corn",
Copy link
Member

@tyrasd tyrasd Dec 13, 2021

Choose a reason for hiding this comment

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

merely also labeling crop=maize as “Corn”

One downside of this is that the list would contain two entries labeled as corn (once for the corn tag value itself and once for the translation of the maize value), with only slight differences in style and spelling… not ideal

PS: A similar issue exist for vegetable which is labeled as Vegetables, but vegetables is also a relatively often used value for the tag.

@tyrasd tyrasd added the enhancement New feature or request label Dec 13, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Dec 16, 2021

I'm not 100% sure if this is the right approach. One issue, for example, is that the list could become outdated relatively quickly (we would kind of need a way to monitor changes in usage of the tag). Wouldn't it make more sense to just use the list as on the OSM wiki (just excluding "discouraged" entries)? This would probably allow for easier syncing of future changes.

It was an arbitrary cutoff, to be sure. Normally I would prefer to just go off of the list on the wiki, but this particular wiki page is a mess. Apart from the values explicitly marked as “avoid”, the page also remarks that some values are “unspecific” or says to see some other tag – does that mean the documented tag is problematic? What about the crops that have multiple documented spellings?

Despite the mess, it would be great if we could at least make some of the more certain values localizable. Maybe we could limit the PR to just the values used by StreetComplete for now?

@matkoniecz
Copy link
Contributor

Maybe maize / corn mess can be skipped for now and moved to a separate PR?

@tyrasd tyrasd added new-label changes the name, aliases or terms of a preset and removed enhancement New feature or request labels Oct 14, 2022
@tyrasd tyrasd merged commit 130e5dd into openstreetmap:main Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-label changes the name, aliases or terms of a preset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants