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

Added preset for boundary=marker #8113

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kubahaha
Copy link

@kubahaha kubahaha commented May 6, 2024

Hello
I tried to add preset for boundary=marker. Can someone take a look please?

Following instructions from docs/STYLES.ms I was unable to run tools/unix/generate_symbols.sh and next scripts due to following CMake errors:

CMake Error at 3party/CMakeLists.txt:24 (add_subdirectory):

  add_subdirectory given source "expat/expat" which is not an existing
  directory.


CMake Error at 3party/CMakeLists.txt:25 (add_library):
  add_library cannot create ALIAS target "expat::expat" because target
  "expat" does not already exist.


CMake Error at 3party/CMakeLists.txt:33 (add_subdirectory):
  The source directory

    /home/user/repos/organicmaps/3party/jansson/jansson

  does not contain a CMakeLists.txt file.


CMake Error at 3party/CMakeLists.txt:34 (target_include_directories):
  Cannot specify include directories for target "jansson" which is not built
  by this project.


CMake Error at 3party/CMakeLists.txt:35 (add_library):
  add_library cannot create ALIAS target "jansson::jansson" because target
  "jansson" does not already exist.


CMake Error at 3party/CMakeLists.txt:38 (add_subdirectory):
  The source directory

    /home/user/repos/organicmaps/3party/gflags

  does not contain a CMakeLists.txt file.


CMake Error at 3party/CMakeLists.txt:39 (target_compile_options):
  Cannot specify compile options for target "gflags_nothreads_static" which
  is not built by this project.

can someone help me fix that dependencies, or by any chance would like to run it on already configured environment?

@pastk
Copy link
Contributor

pastk commented May 7, 2024

Did you run git submodule update --init --recursive?

Copy link
Contributor

@pastk pastk left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Some changes are needed

data/editor.config Outdated Show resolved Hide resolved
data/styles/clear/include/Icons.mapcss Outdated Show resolved Hide resolved
data/styles/clear/include/Icons.mapcss Outdated Show resolved Hide resolved
data/styles/clear/include/priorities_4_overlays.prio.txt Outdated Show resolved Hide resolved
data/styles/vehicle/include/Icons.mapcss Outdated Show resolved Hide resolved
@pastk
Copy link
Contributor

pastk commented May 7, 2024

I was unable to run tools/unix/generate_symbols.sh

actually generate_symbols.sh is not needed in this case as there is no new icon

you just need to run generate_drules.sh and generate_localizations.sh

Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
@kubahaha
Copy link
Author

kubahaha commented May 7, 2024

Thank you for your comments. I tried to resolve them, please let me know if I missed something.
This project is pretty complex, so it's difficult for me to see all dependencies

@pastk
Copy link
Contributor

pastk commented May 7, 2024

The latest changes look good, thanks!

Please rebase your PR onto the current master (right now your PR has two unrelated commits), then run generate_drules.sh and commit separately as [styles] Regenerate.

Would you want to include more translations in this PR also?
Then the usual way is to seed them with auto-generated translations via the tools/python/translate.py script and then ask the translation team to proof-read / correct.

@pastk
Copy link
Contributor

pastk commented May 7, 2024

auto-generated translations via the tools/python/translate.py script

Actually one needs a Deepl api key to run it, so here is the result which you can integrate:

    en = Boundary Marker
    af = Grensmerker
    ar = علامة الحدود
    az = Sərhəd işarəsi
    be = Межавы знак
    bg = Граничен маркер
    ca = Marcador de límit
    cs = Hraniční značka
    da = Grænsemarkør
    de = Grenzmarkierung
    el = Οριακός δείκτης
    es = Hito fronterizo
    et = Piirimärk
    eu = Muga-markatzailea
    fa = نشانگر مرز
    fi = Rajamerkki
    fr = Marqueur de frontière
    he = סמן גבול
    hi = सीमा चिन्हक
    hu = Határjelző
    id = Penanda batas
    it = Marcatore di confine
    ja = バウンダリーマーカー
    ko = 경계 마커
    lt = Ribų žymeklis
    mr = सीमा चिन्हक
    nb = Grensemarkør
    nl = Grensmarkering
    pl = Znacznik granic
    pt = Marcador de fronteira
    pt-BR = Marcador de limite
    ro = Marcaj de delimitare
    ru = Пограничный знак
    sk = Hraničná značka
    sv = Gränsmarkör
    sw = Alama ya mpaka
    th = เครื่องหมายเขตแดน
    tr = Sınır işaretleyici
    uk = Прикордонний знак
    vi = Điểm đánh dấu ranh giới
    zh-Hans = 界标
    zh-Hant = 界碑

data/categories.txt Outdated Show resolved Hide resolved
Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
Kuba Mędrek added 2 commits May 9, 2024 23:04
Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
@pastk
Copy link
Contributor

pastk commented May 9, 2024

    en = Boundary Marker
    af = Grensmerker
    ar = علامة الحدود
    az = Sərhəd işarəsi
    be = Межавы знак
    bg = Граничен маркер
    ca = Marcador de límit
    cs = Hraniční značka
    da = Grænsemarkør
    de = Grenzmarkierung
    el = Οριακός δείκτης
    es = Hito fronterizo
    et = Piirimärk
    eu = Muga-markatzailea
    fa = نشانگر مرز
    fi = Rajamerkki
    fr = Marqueur de frontière
    he = סמן גבול
    hi = सीमा चिन्हक
    hu = Határjelző
    id = Penanda batas
    it = Marcatore di confine
    ja = バウンダリーマーカー
    ko = 경계 마커
    lt = Ribų žymeklis
    mr = सीमा चिन्हक
    nb = Grensemarkør
    nl = Grensmarkering
    pl = Znacznik granic
    pt = Marcador de fronteira
    pt-BR = Marcador de limite
    ro = Marcaj de delimitare
    ru = Пограничный знак
    sk = Hraničná značka
    sv = Gränsmarkör
    sw = Alama ya mpaka
    th = เครื่องหมายเขตแดน
    tr = Sınır işaretleyici
    uk = Прикордонний знак
    vi = Điểm đánh dấu ranh giới
    zh-Hans = 界标
    zh-Hant = 界碑

@organicmaps/translations review these translations please.
Context: a marker/sign/pole put at some boundaries/borders e.g. between countries or an administrative boundary...

@kubahaha
Copy link
Author

kubahaha commented May 9, 2024

I still have some troubles running generate_drules.sh

Building drawing rules for style clear/clear
Loaded priorities: 997 overlays, 324 FG, 26 BG-top, 102 BG-by-size.
Re-formated priorities files: 1731 overlays, 346 FG, 26 BG-top, 102 BG-by-size.
Building drawing rules for style clear/night
Loaded priorities: 997 overlays, 324 FG, 26 BG-top, 102 BG-by-size.
Re-formated priorities files: 1731 overlays, 346 FG, 26 BG-top, 102 BG-by-size.
Building drawing rules for style outdoors/clear
Loaded priorities: 997 overlays, 331 FG, 26 BG-top, 102 BG-by-size.
Re-formated priorities files: 1731 overlays, 353 FG, 26 BG-top, 102 BG-by-size.
Building drawing rules for style outdoors/night
Loaded priorities: 997 overlays, 331 FG, 26 BG-top, 102 BG-by-size.
Re-formated priorities files: 1731 overlays, 353 FG, 26 BG-top, 102 BG-by-size.
Building drawing rules for style vehicle/clear
Loaded priorities: 519 overlays, 234 FG, 17 BG-top, 69 BG-by-size.
Re-formated priorities files: 875 overlays, 278 FG, 17 BG-top, 69 BG-by-size.
Building drawing rules for style vehicle/night
Loaded priorities: 519 overlays, 234 FG, 17 BG-top, 69 BG-by-size.
Re-formated priorities files: 875 overlays, 278 FG, 17 BG-top, 69 BG-by-size.
Exporting transit colors...
Merging default and vehicle styles...
Traceback (most recent call last):
  File "/home/user/Paczki/organicmaps/./tools/unix/../../tools/python/stylesheet/drules_merge.py", line 6, in <module>
    import drules_struct_pb2
  File "/home/user/Paczki/organicmaps/tools/python/stylesheet/drules_struct_pb2.py", line 32, in <module>
    _descriptor.EnumValueDescriptor(
  File "/home/user/local/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 914, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

I updated translations manually. Tbh I am not sure if I will manage to fix generate_drules errors by myself - I have no expertise in this build process, libs used etc.

All other comments should be resolved, thanks for patience

@pastk
Copy link
Contributor

pastk commented May 9, 2024

@kubahaha please try to downgrade your protobuf version, e.g. I have 3.19.4 installed (via pip3) and it works well.

upd: and what is your current version by the way?

@alexgabi
Copy link
Contributor

alexgabi commented May 9, 2024

    en = Boundary Marker
    af = Grensmerker
    ar = علامة الحدود
    az = Sərhəd işarəsi
    be = Межавы знак
    bg = Граничен маркер
    ca = Marcador de límit
    cs = Hraniční značka
    da = Grænsemarkør
    de = Grenzmarkierung
    el = Οριακός δείκτης
    es = Hito fronterizo
    et = Piirimärk
    eu = Muga-markatzailea
    fa = نشانگر مرز
    fi = Rajamerkki
    fr = Marqueur de frontière
    he = סמן גבול
    hi = सीमा चिन्हक
    hu = Határjelző
    id = Penanda batas
    it = Marcatore di confine
    ja = バウンダリーマーカー
    ko = 경계 마커
    lt = Ribų žymeklis
    mr = सीमा चिन्हक
    nb = Grensemarkør
    nl = Grensmarkering
    pl = Znacznik granic
    pt = Marcador de fronteira
    pt-BR = Marcador de limite
    ro = Marcaj de delimitare
    ru = Пограничный знак
    sk = Hraničná značka
    sv = Gränsmarkör
    sw = Alama ya mpaka
    th = เครื่องหมายเขตแดน
    tr = Sınır işaretleyici
    uk = Прикордонний знак
    vi = Điểm đánh dấu ranh giới
    zh-Hans = 界标
    zh-Hant = 界碑

@organicmaps/translations review these translations please. Context: a marker/sign/pole put at some boundaries/borders e.g. between countries or an administrative boundary...

eu = Mugarria

Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
@kubahaha
Copy link
Author

kubahaha commented May 9, 2024

@kubahaha please try to downgrade your protobuf version, e.g. I have 3.19.4 installed (via pip3) and it works well.

3.20.0 worked well for me.

upd: and what is your current version by the way?

It was 5.26.1

Should I update translations file according to comments? I changed manuall [pl] translation, as I am native speaker of polish.

@pastk
Copy link
Contributor

pastk commented May 9, 2024

Awesome!
Let's wait a day or so to give other translators time to proof read (also feel free to use your previous DE version, mine is auto translated). After that apply all translation suggestions, run generate_localizations.sh and commit resulting changes as [strings] Regenerate and done!

Comment on lines 6553 to 6554
pt = Marcador de fronteira
pt-BR = Marcador de limite
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pt = Marcador de fronteira
pt-BR = Marcador de limite
pt = Marco de fronteira

PT = PT-BR = Marco de fronteira (since it's equal, no need to have PT-BR duplicated)

@muralito
Copy link
Contributor

muralito commented May 9, 2024

en = Boundary Marker
es = Hito fronterizo

@organicmaps/translations review these translations please. Context: a marker/sign/pole put at some boundaries/borders e.g. between countries or an administrative boundary...

es it's OK.

pl = Znak graniczny
pt = Marcador de fronteira
pt-BR = Marcador de limite
ro = Marcaj de delimitare
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ro = Marcaj de delimitare
ro = Piatră de hotar

@alexgabi
Copy link
Contributor

en = Boundary Marker
eu = Mugarria

@NeatNit
Copy link
Contributor

NeatNit commented May 10, 2024

he seems good.

ca = Marcador de límit
cs = Hraniční značka
da = Grænsemarkør
de = Grenzmarkierung
Copy link

@Vuizur Vuizur May 21, 2024

Choose a reason for hiding this comment

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

It should de = Grenzstein.
I think that some number of other translations are also not correct (for example probably Czech), maybe one could take the translations from Wikipedia: https://en.wikipedia.org/wiki/Boundary_marker

Signed-off-by: Kuba Mędrek <kubix.medrek@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants