[strings] Update Ukrainian locale #889

Merged
edbond88 merged 1 commit from master into master 2021-07-24 22:30:36 +00:00
edbond88 commented 2021-07-19 22:09:39 +00:00 (Migrated from github.com)

I added some updates to Ukrainian locale. But can't run this script ./tools/unix/generate_localizations.sh

I followed this steps:

  1. Run git submodule update --init --recursive
  2. Run brew install ruby
  3. Run ./tools/unix/generate_localizations.sh
  4. Get error:
+ case $OSTYPE in
+ '[' -x /usr/local/opt/ruby/bin/ruby ']'
+ PATH=/usr/local/opt/ruby/bin:/Users/edbond/.nvm/versions/node/v14.16.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
++ dirname ./tools/unix/generate_localizations.sh
+ OMIM_PATH=./tools/unix/../..
+ TWINE=./tools/unix/../../tools/twine/twine
+ STRINGS_PATH=./tools/unix/../../data/strings
++ mktemp
+ MERGED_FILE=/var/folders/mp/_qdv23fx6tlgdjkx69nk94l40000gn/T/tmp.wOzPX7dx
+ cat ./tools/unix/../../data/strings/strings.txt ./tools/unix/../../data/strings/partners_strings.txt ./tools/unix/../../data/strings/types_strings.txt ./tools/unix/../../data/strings/brands_strings.txt
+ ./tools/unix/../../tools/twine/twine generate-all-localization-files --include translated --format android /var/folders/mp/_qdv23fx6tlgdjkx69nk94l40000gn/T/tmp.wOzPX7dx ./tools/unix/../../android/res/
<internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- safe_yaml/load (LoadError)
	from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine/plugin.rb:2:in `<top (required)>'
	from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:25:in `<module:Twine>'
	from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:1:in `<top (required)>'
	from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from ./tools/unix/../../tools/twine/bin/twine:2:in `<main>'

OS: macOS BigSur 11.4
Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

I added some updates to Ukrainian locale. But can't run this script `./tools/unix/generate_localizations.sh` I followed this steps: 1. Run `git submodule update --init --recursive` 2. Run `brew install ruby` 3. Run `./tools/unix/generate_localizations.sh` 4. Get error: ``` + case $OSTYPE in + '[' -x /usr/local/opt/ruby/bin/ruby ']' + PATH=/usr/local/opt/ruby/bin:/Users/edbond/.nvm/versions/node/v14.16.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin ++ dirname ./tools/unix/generate_localizations.sh + OMIM_PATH=./tools/unix/../.. + TWINE=./tools/unix/../../tools/twine/twine + STRINGS_PATH=./tools/unix/../../data/strings ++ mktemp + MERGED_FILE=/var/folders/mp/_qdv23fx6tlgdjkx69nk94l40000gn/T/tmp.wOzPX7dx + cat ./tools/unix/../../data/strings/strings.txt ./tools/unix/../../data/strings/partners_strings.txt ./tools/unix/../../data/strings/types_strings.txt ./tools/unix/../../data/strings/brands_strings.txt + ./tools/unix/../../tools/twine/twine generate-all-localization-files --include translated --format android /var/folders/mp/_qdv23fx6tlgdjkx69nk94l40000gn/T/tmp.wOzPX7dx ./tools/unix/../../android/res/ <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- safe_yaml/load (LoadError) from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine/plugin.rb:2:in `<top (required)>' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:25:in `<module:Twine>' from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:1:in `<top (required)>' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from ./tools/unix/../../tools/twine/bin/twine:2:in `<main>' ``` **OS:** macOS BigSur 11.4 **Ruby:** ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
biodranik commented 2021-07-19 23:13:27 +00:00 (Migrated from github.com)

That's a weird bug with the ruby module. Try to google the error, there are some workarounds (fix permissions for example).

But we can also help to regenerate strings after the review. Please note that there are also three more files:

https://github.com/organicmaps/organicmaps/blob/master/iphone/plist.txt
https://github.com/organicmaps/organicmaps/blob/master/data/categories_cuisines.txt
and
https://github.com/organicmaps/organicmaps/blob/master/data/categories.txt

The last one is very important. The first word is visible to users and is also used in the search. All other words are "search synonyms", which work if a user types them in the search. A number before a word means "show the whole word as a hint after typing this number of first word's characters"

That's a weird bug with the ruby module. Try to google the error, there are some workarounds (fix permissions for example). But we can also help to regenerate strings after the review. Please note that there are also three more files: https://github.com/organicmaps/organicmaps/blob/master/iphone/plist.txt https://github.com/organicmaps/organicmaps/blob/master/data/categories_cuisines.txt and https://github.com/organicmaps/organicmaps/blob/master/data/categories.txt The last one is very important. The first word is visible to users and is also used in the search. All other words are "search synonyms", which work if a user types them in the search. A number before a word means "show the whole word as a hint after typing this number of first word's characters"
biodranik (Migrated from github.com) approved these changes 2021-07-19 23:15:32 +00:00
greshilov commented 2021-07-20 21:16:58 +00:00 (Migrated from github.com)

from internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine/plugin.rb:2:in <top (required)>'
from internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:25:in <module:Twine>' from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:1:in <top (required)>'
from internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in require'
from ./tools/unix/../../tools/twine/bin/twine:2:in `

'


**OS:** macOS BigSur 11.4
**Ruby:** ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

It's probably because of missing twine dependencies. Please, try to install them manually:

gem install safe_yaml rubyzip
> from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' > from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine/plugin.rb:2:in `<top (required)>' > from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' > from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' > from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:25:in `<module:Twine>' > from /Users/edbond/Projects/organicmaps/tools/twine/lib/twine.rb:1:in `<top (required)>' > from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' > from <internal:/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' > from ./tools/unix/../../tools/twine/bin/twine:2:in `<main>' > ``` > > **OS:** macOS BigSur 11.4 > **Ruby:** ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20] It's probably because of missing `twine` dependencies. Please, try to install them manually: ``` gem install safe_yaml rubyzip ```
biodranik commented 2021-07-24 07:38:45 +00:00 (Migrated from github.com)

@edbond88 we fixed the regeneration script, but please don't run it yet. Let's merge all changes first.
Can you please amend and sign your commit?

git commit --amend --signoff
git push -f
@edbond88 we fixed the regeneration script, but please don't run it yet. Let's merge all changes first. Can you please amend and sign your commit? ``` git commit --amend --signoff git push -f ```
rtsisyk approved these changes 2021-07-24 14:04:10 +00:00
rtsisyk left a comment
Owner

Thanks for the contribution.

Please sign-off:

git commit --amend --signoff
git push -f

Thanks for the contribution. Please sign-off: git commit --amend --signoff git push -f
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#889
No description provided.