[search] Make all existing sports searchable #2740

Merged
j13m126 merged 5 commits from sports_search into master 2022-06-25 06:35:41 +00:00
j13m126 commented 2022-06-14 20:17:42 +00:00 (Migrated from github.com)

I used Google Translate to add all missing sports translations for a couple of languages.
Cricket and Bowls translations are incomplete because 🦗 and 🥣.

Just to be sure, these are the languages I used:
ar:arabic
cs:czech
da:danish
de:german
el:greek
es:spanish
es-mx:spanish
eu:baskan
fa:persian
fi:finnish
fr:french
hu:hungarian
id:indonesian
it:italian
ja:japanese
ko:korean
mr:marathi
nb:norwegian
nl:dutch
pl:polish
pt:portuguese
pt-BR:portuguese
ro:romanian
ru:russian
sk:slovak
sv:swedish
sw:swahili
th:thai
tr:turkish
uk:ukrainian
vi:vietnamese
zh-Hans:simplified chinese
zh-Hant:traditional chinese

#2511

I used Google Translate to add all missing sports translations for a couple of languages. Cricket and Bowls translations are incomplete because 🦗 and 🥣. Just to be sure, these are the languages I used: ar:arabic cs:czech da:danish de:german el:greek es:spanish es-mx:spanish eu:baskan fa:persian fi:finnish fr:french hu:hungarian id:indonesian it:italian ja:japanese ko:korean mr:marathi nb:norwegian nl:dutch pl:polish pt:portuguese pt-BR:portuguese ro:romanian ru:russian sk:slovak sv:swedish sw:swahili th:thai tr:turkish uk:ukrainian vi:vietnamese zh-Hans:simplified chinese zh-Hant:traditional chinese #2511
biodranik (Migrated from github.com) requested changes 2022-06-16 06:26:12 +00:00
biodranik (Migrated from github.com) left a comment

Please add missing be translations.

@pastk please proof-read and fix that pt-BR bug.

Please add missing be translations. @pastk please proof-read and fix that pt-BR bug.
biodranik (Migrated from github.com) commented 2022-06-16 06:24:48 +00:00

The case should the same as for other translations.

The case should the same as for other translations.
@ -6114,0 +6113,4 @@
it:Football americano
ja:アメリカンフットボール
ko:미식 축구
mr:अमेरिकन फुटबॉल
biodranik (Migrated from github.com) commented 2022-06-16 06:25:24 +00:00

be:Амерыканскі футбол

be:Амерыканскі футбол
pastk requested changes 2022-06-16 19:17:33 +00:00
pastk left a comment
Owner

Thanks for the translations!

  1. Regenerate commit is not needed if its categories.txt only changes.
  2. It would be great to also update corresponding translations in types_strings.txt!
  3. Automatic translation could lead to bogus confusing results sometimes, using headers of wikipedia articles usually leads to better results, e.g. a Curling en article links to articles about this sport in many other languages, the most convenient way to list translations is to go to Wikidata item of the page, e.g. https://www.wikidata.org/wiki/Q136851 and in the bottom there is a list of all linked wiki articles.
    I wish we have it automated similarly to a google translation script we have!
Thanks for the translations! 1. Regenerate commit is not needed if its `categories.txt` only changes. 2. It would be great to also update corresponding translations in `types_strings.txt`! 3. Automatic translation could lead to bogus confusing results sometimes, using headers of wikipedia articles usually leads to better results, e.g. a [Curling](https://en.wikipedia.org/wiki/Curling) en article links to articles about this sport in many other languages, the most convenient way to list translations is to go to Wikidata item of the page, e.g. https://www.wikidata.org/wiki/Q136851 and in the bottom there is a list of all linked wiki articles. I wish we have it automated similarly to a google translation script we have!
@ -6157,0 +6240,4 @@
sport-baseball
en:Baseball
ar:البيسبول
be:Бейсбол

ru:Боулз

ru:Боулз

uk:Боулз

uk:Боулз

ru:Кёрлинг

I think quite a lot of translations here maybe bogus because its synonymous to "curly-ing".

ru:Кёрлинг I think quite a lot of translations here maybe bogus because its synonymous to "curly-ing".

This feature has been labeled as deprecated. The recommended replacement is: sport=scuba_diving or sport=cliff_diving.

> This feature has been labeled as deprecated. The recommended replacement is: [sport](https://wiki.openstreetmap.org/wiki/Key:sport)=[scuba_diving](https://wiki.openstreetmap.org/wiki/Tag:sport%3Dscuba_diving) or [sport](https://wiki.openstreetmap.org/wiki/Key:sport)=[cliff_diving](https://wiki.openstreetmap.org/wiki/Tag:sport%3Dcliff_diving).

Pls change to

# Used to tag a scuba diving site
sport-scuba_diving
en:Scuba diving site
Pls change to ``` # Used to tag a scuba diving site sport-scuba_diving en:Scuba diving site ```

ru:Место для дайвинга

ru:Место для дайвинга

Місце для дайвінгу

Місце для дайвінгу

uk:Стрільба

uk:Стрільба

ru:Футбол

ru:Футбол
pastk reviewed 2022-06-16 19:19:11 +00:00

Case doesn't really matter for categories.txt.
Hopefully one day we have an autoformatter for it!

Case doesn't really matter for `categories.txt`. Hopefully one day we have an autoformatter for it!
Owner

Btw, you can double-check your list of languages by running tools/python/strings_utils.py -pl -t, basically all languages with a lot of existing translations could be considered as "supported".

Btw, you can double-check your list of languages by running `tools/python/strings_utils.py -pl -t`, basically all languages with a lot of existing translations could be considered as "supported".
j13m126 commented 2022-06-16 22:54:50 +00:00 (Migrated from github.com)

Alright, thanks for all the corrections.
This is what I did:

  • capitalized a few
  • added be and he translation
  • corrected the mistakes you found
  • added and corrected a few translations from wikipedia, especially for curling, bowls, cricket
  • added australian_football
  • sorted some sports

I'll update translations in types_strings.txt in another PR, if you don't mind. That might take a while.

Alright, thanks for all the corrections. This is what I did: - capitalized a few - added be and he translation - corrected the mistakes you found - added and corrected a few translations from wikipedia, especially for curling, bowls, cricket - added australian_football - sorted some sports I'll update translations in `types_strings.txt` in another PR, if you don't mind. That might take a while.
pastk requested changes 2022-06-17 11:08:03 +00:00
pastk left a comment
Owner

Please remove the regenerate commit.

Please remove the regenerate commit.
sport-australian_football
```suggestion sport-australian_football ```

I checked a wikipedia article on Australian Football and its not Rugby, its a separate kind of sport!

I checked a wikipedia article on Australian Football and its not Rugby, its a separate kind of sport!
@ -6157,0 +6240,4 @@
sport-baseball
en:Baseball
ar:البيسبول
be:Бейсбол

Please remove it, its deprecated and just ~100 uses worldwide.

Please remove it, its deprecated and just ~100 uses worldwide.
pastk approved these changes 2022-06-18 19:54:52 +00:00
pastk left a comment
Owner

It was quite a lot of work to do, thanks a lot!!

It was quite a lot of work to do, thanks a lot!!
biodranik (Migrated from github.com) requested changes 2022-06-18 20:46:53 +00:00
biodranik (Migrated from github.com) left a comment

@pastk @vng

  1. Is there a generalized search category for sports? Let's add one, at least to be able to search by typing it.
  2. We already discussed it: if there are already some translations in types_strings.txt, there is no rationale to copy-paste it into the categories.txt. There should be a way to add a type in categories.txt, so it will automatically load translations and use them for the search, optionally adding some synonyms.
@pastk @vng 1. Is there a generalized search category for sports? Let's add one, at least to be able to search by typing it. 2. We already discussed it: if there are already some translations in types_strings.txt, there is no rationale to copy-paste it into the categories.txt. There should be a way to add a type in categories.txt, so it will automatically load translations and use them for the search, optionally adding some synonyms.
biodranik (Migrated from github.com) commented 2022-06-18 20:32:43 +00:00
pl:Futbol australijski
```suggestion pl:Futbol australijski ```
biodranik (Migrated from github.com) commented 2022-06-18 20:33:02 +00:00
ru:Австралийский футбол
```suggestion ru:Австралийский футбол ```
biodranik (Migrated from github.com) commented 2022-06-18 20:34:34 +00:00
bg:Атлетика|лека
```suggestion bg:Атлетика|лека ```
biodranik (Migrated from github.com) commented 2022-06-18 20:35:08 +00:00
nb:Australsk fotball
```suggestion nb:Australsk fotball ```
biodranik (Migrated from github.com) commented 2022-06-18 20:36:42 +00:00
pt:Basebol

Please double-check all pt (Portuguese) translations with DeepL. Google doesn't support pt-PT, only pt-BR.

```suggestion pt:Basebol ``` Please double-check all pt (Portuguese) translations with DeepL. Google doesn't support pt-PT, only pt-BR.
biodranik (Migrated from github.com) commented 2022-06-18 20:37:05 +00:00
uk:Бейсбол
```suggestion uk:Бейсбол ```
biodranik (Migrated from github.com) commented 2022-06-18 20:37:46 +00:00
bg:Баскетбол|игрище
```suggestion bg:Баскетбол|игрище ```
biodranik (Migrated from github.com) commented 2022-06-18 20:43:23 +00:00
uk:Футбол
```suggestion uk:Футбол ```
biodranik (Migrated from github.com) commented 2022-06-18 20:43:33 +00:00
sk:Futbal
```suggestion sk:Futbal ```
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука
biodranik (Migrated from github.com) commented 2022-06-18 20:30:59 +00:00

If the translation is the same as the base lang (es or pt), then it should not be overridden. @pastk right?

If the translation is the same as the base lang (es or pt), then it should not be overridden. @pastk right?
@ -6157,0 +6293,4 @@
id:Bola basket
it:Pallacanestro
ja:バスケットボール
ko:농구
biodranik (Migrated from github.com) commented 2022-06-18 20:38:43 +00:00

@vng @pastk are these new and old types added into the generalized category like "sport(s)"?

@vng @pastk are these new and old types added into the generalized category like "sport(s)"?
@ -6157,0 +6713,4 @@
el:Κολύμβηση
es:Natación
eu:Igeriketa
fa:شنا
biodranik (Migrated from github.com) commented 2022-06-18 20:42:46 +00:00

en:Football
en-US:Soccer

@pastk @vng do we support it?

en:Football en-US:Soccer @pastk @vng do we support it?
pastk reviewed 2022-06-18 21:11:51 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука

Its not necessary anymore, but it won't hurt either.
Our translation files are full of duplicates like this from the [recent] times when duplicating was mandatory.
It should be deduplicated by an autoformatting script some day.

Its not necessary anymore, but it won't hurt either. Our translation files are full of duplicates like this from the [recent] times when duplicating was mandatory. It should be deduplicated by an autoformatting script some day.
pastk reviewed 2022-06-18 21:12:46 +00:00
@ -6157,0 +6713,4 @@
el:Κολύμβηση
es:Natación
eu:Igeriketa
fa:شنا

yes

yes
pastk reviewed 2022-06-18 21:14:19 +00:00
@ -6157,0 +6293,4 @@
id:Bola basket
it:Pallacanestro
ja:バスケットボール
ko:농구

there is no such category yet

there is no such category yet
biodranik (Migrated from github.com) reviewed 2022-06-18 21:17:35 +00:00
@ -6157,0 +6293,4 @@
id:Bola basket
it:Pallacanestro
ja:バスケットボール
ko:농구
biodranik (Migrated from github.com) commented 2022-06-18 21:17:35 +00:00

@vng can you add it?

@vng can you add it?
j13m126 (Migrated from github.com) reviewed 2022-06-18 21:22:49 +00:00
j13m126 (Migrated from github.com) commented 2022-06-18 21:22:49 +00:00

alright

alright
biodranik (Migrated from github.com) reviewed 2022-06-18 21:59:36 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука
biodranik (Migrated from github.com) commented 2022-06-18 21:59:36 +00:00

There is no reason to create new duplicates and support them. Fewer lines = easier support.

There is no reason to create new duplicates and support them. Fewer lines = easier support.
vng (Migrated from github.com) reviewed 2022-06-19 05:37:51 +00:00
@ -6157,0 +6293,4 @@
id:Bola basket
it:Pallacanestro
ja:バスケットボール
ko:농구
vng (Migrated from github.com) commented 2022-06-19 05:37:51 +00:00

Can be done in this PR, the same as @food or any other in this file.

Can be done in this PR, the same as ```@food``` or any other in this file.
pastk reviewed 2022-06-19 11:52:08 +00:00
@ -6157,0 +6293,4 @@
id:Bola basket
it:Pallacanestro
ja:バスケットボール
ko:농구

What will be a use case for such a category though?
I can see people searching for e.g. a sports venue or a sports ground / fitness station around, but why looking for a list of kinds of sports?

What will be a use case for such a category though? I can see people searching for e.g. a sports venue or a sports ground / fitness station around, but why looking for a list of kinds of sports?
pastk reviewed 2022-06-19 11:58:20 +00:00
@ -6157,0 +6713,4 @@
el:Κολύμβηση
es:Natación
eu:Igeriketa
fa:شنا

ok, atm it looks like regional languages don't work in categories.txt at all

ok, atm it looks like regional languages don't work in `categories.txt` at all
biodranik commented 2022-06-19 12:55:58 +00:00 (Migrated from github.com)
  • To quickly find something nearby to play.
  • To check the area for amenities when moving or renting a place
  • To check if all sports around were properly added
- To quickly find something nearby to play. - To check the area for amenities when moving or renting a place - To check if all sports around were properly added
pastk reviewed 2022-06-19 15:23:14 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука

True, my point is just its tedious and inefficient to do by hand ("мартышкин труд"), so I would rather accept as is instead of insisting people spend their time on insignificant things which could be fixed later in bulk.

True, my point is just its tedious and inefficient to do by hand ("мартышкин труд"), so I would rather accept as is instead of insisting people spend their time on insignificant things which could be fixed later in bulk.
biodranik (Migrated from github.com) reviewed 2022-06-19 15:31:44 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука
biodranik (Migrated from github.com) commented 2022-06-19 15:31:43 +00:00

Consistency even with minor details makes a good example for other contributors.

Consistency even with minor details makes a good example for other contributors.
dbf256 (Migrated from github.com) reviewed 2022-06-19 16:46:15 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука
dbf256 (Migrated from github.com) commented 2022-06-19 16:46:15 +00:00

@biodranik @pastk I can try to create a simple script to de-duplicate non-base strings if base string value is the same to fix existing data. Are you fine with it?

@biodranik @pastk I can try to create a simple script to de-duplicate non-base strings if base string value is the same to fix existing data. Are you fine with it?
pastk reviewed 2022-06-19 17:12:41 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука

@dbf256 That'd be great!
So the de-duplication shall apply to regional languages only, e.g. es-MX, en-AU, pt-BR etc. See #1757 for a reference. TBH I don't remember if zh-Hant/zh-Hans should follow this rule too or not - need to check...

(you may want to re-use that outdated categories_converter.py script if its of any value)
And then we'll be able to expand the script to add auto-formatting, validation, etc. to categories.txt too!

@dbf256 That'd be great! So the de-duplication shall apply to regional languages only, e.g. `es-MX`, `en-AU`, `pt-BR` etc. See #1757 for a reference. TBH I don't remember if `zh-Hant`/`zh-Hans` should follow this rule too or not - need to check... (you may want to re-use that outdated `categories_converter.py` script if its of any value) And then we'll be able to expand the script to add auto-formatting, validation, etc. to categories.txt too!
pastk reviewed 2022-06-19 17:20:48 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука

Also - if you want and you have time - it'll be great to do the same de-duplication to types_strings.txt and strings.txt, its better to add this functionality to an existing script strings_utils.py which processes those files.

Also - if you want and you have time - it'll be great to do the same de-duplication to `types_strings.txt` and `strings.txt`, its better to add this functionality to an existing script `strings_utils.py` which processes those files.
biodranik (Migrated from github.com) reviewed 2022-06-19 18:40:33 +00:00
@ -6137,0 +6158,4 @@
pt:Tiro com arco
pt-BR:Tiro com arco
ro:TIR cu arcul
ru:Стрельба из лука
biodranik (Migrated from github.com) commented 2022-06-19 18:40:32 +00:00

Here is the full picture:

  1. zh-Hans and zh-Hant are distinct scripts, they always should be present.
  2. All string validations and cleanups should be automatically run from tools/unix/generate_localizations.sh
  3. Existing duplicates should be cleaned when sub-lang (en-AU for en, es-MX for es, pt-BR for pt) has the same translation as the base lang.
  4. Ensure that categories.txt takes all translations from types_strings.txt, and has only additional synonyms where necessary.
  5. After that categories.txt should be cleaned automatically, leaving only those synonyms that are absent in types_strings.txt
Here is the full picture: 1. zh-Hans and zh-Hant are distinct scripts, they always should be present. 2. All string validations and cleanups should be automatically run from tools/unix/generate_localizations.sh 3. Existing duplicates should be cleaned when sub-lang (en-AU for en, es-MX for es, pt-BR for pt) has the same translation as the base lang. 4. Ensure that categories.txt takes all translations from types_strings.txt, and has only additional synonyms where necessary. 5. After that categories.txt should be cleaned automatically, leaving only those synonyms that are absent in types_strings.txt
R3gi (Migrated from github.com) approved these changes 2022-06-21 20:02:17 +00:00
R3gi (Migrated from github.com) left a comment

Czech translation looks great! Good job!

Czech translation looks great! Good job!
R3gi (Migrated from github.com) commented 2022-06-21 20:01:15 +00:00

This is OK, but I would prefer Střelba.

This is OK, but I would prefer `Střelba`.
j13m126 (Migrated from github.com) reviewed 2022-06-21 22:45:18 +00:00
j13m126 (Migrated from github.com) commented 2022-06-21 22:45:18 +00:00

Thank you for looking over. I added Střelba.

Thank you for looking over. I added Střelba.
vng (Migrated from github.com) approved these changes 2022-06-24 11:11:02 +00:00
biodranik (Migrated from github.com) approved these changes 2022-06-25 06:35:24 +00:00
This repo is archived. You cannot comment on pull requests.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#2740
No description provided.