mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 20:44:25 +00:00
Compare commits
4 Commits
298518ae72
...
4691de7a66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4691de7a66 | ||
|
|
3c082b0629 | ||
|
|
a468bd3fab | ||
|
|
fc87316184 |
@@ -1,69 +1,55 @@
|
||||
# All non-assigned.
|
||||
* @organicmaps/mergers
|
||||
# Visual design.
|
||||
/android/app/src/main/res/drawable*/ @organicmaps/design
|
||||
/android/app/src/main/res/font/ @organicmaps/design
|
||||
/android/app/src/main/res/mipmap*/ @organicmaps/design
|
||||
/data/*.ttf @organicmaps/design
|
||||
/data/resources-svg/ @organicmaps/design
|
||||
/data/search-icons/ @organicmaps/design
|
||||
/iphone/Maps/Images.xcassets/ @organicmaps/design
|
||||
/android/app/src/main/res/drawable*/ @comaps/design
|
||||
/android/app/src/main/res/font/ @comaps/design
|
||||
/android/app/src/main/res/mipmap*/ @comaps/design
|
||||
/data/*.ttf @comaps/design
|
||||
/data/resources-svg/ @comaps/design
|
||||
/data/search-icons/ @comaps/design
|
||||
/iphone/Maps/Images.xcassets/ @comaps/design
|
||||
# Android.
|
||||
/android/ @organicmaps/android
|
||||
/android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
||||
/docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
||||
/docs/JAVA_STYLE.md @organicmaps/android
|
||||
/android/ @comaps/android
|
||||
/android/app/src/main/java/app/comaps/car/ @comaps/android-auto
|
||||
/docs/ANDROID_LOCATION_TEST.md @comaps/android
|
||||
/docs/JAVA_STYLE.md @comaps/android
|
||||
# no owner for translation changes
|
||||
/android/app/src/main/res/values*/strings.xml
|
||||
# iOS.
|
||||
/iphone/ @organicmaps/ios
|
||||
/xcode/ @organicmaps/ios
|
||||
/docs/OBJC_STYLE.md @organicmaps/ios
|
||||
/iphone/ @comaps/ios
|
||||
/xcode/ @comaps/ios
|
||||
/docs/OBJC_STYLE.md @comaps/ios
|
||||
# no owner for translation changes
|
||||
/iphone/plist.txt
|
||||
/iphone/Maps/LocalizedStrings/
|
||||
# Qt
|
||||
/qt/ @organicmaps/qt
|
||||
# Rendering
|
||||
/drape/ @organicmaps/rendering
|
||||
/drape_frontend/ @organicmaps/rendering
|
||||
# Map Data.
|
||||
/tools/python/maps_generator/ @organicmaps/data
|
||||
/generator/ @organicmaps/data
|
||||
/topography_generator/ @organicmaps/data
|
||||
/data/borders/ @organicmaps/data
|
||||
/data/conf/isolines/ @organicmaps/data
|
||||
/docs/SUBWAY_GENERATION.md @organicmaps/data
|
||||
/docs/MAPS.md @organicmaps/data
|
||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
||||
# no owner (changed often to add a new POI)
|
||||
/generator/generator_tests/osm_type_test.cpp
|
||||
# Map Styles.
|
||||
/data/styles/ @organicmaps/styles
|
||||
/data/types.txt @organicmaps/styles
|
||||
/data/visibility.txt @organicmaps/styles
|
||||
/data/mapcss-mapping.csv @organicmaps/styles
|
||||
/data/replaced_tags.txt @organicmaps/styles
|
||||
/data/classificator.txt @organicmaps/styles
|
||||
/data/drules_* @organicmaps/styles
|
||||
/data/styles/ @comaps/styles
|
||||
/data/types.txt @comaps/styles
|
||||
/data/visibility.txt @comaps/styles
|
||||
/data/mapcss-mapping.csv @comaps/styles
|
||||
/data/replaced_tags.txt @comaps/styles
|
||||
/data/classificator.txt @comaps/styles
|
||||
/data/drules_* @comaps/styles
|
||||
/docs/STYLES.md
|
||||
/tools/kothic/ @organicmaps/styles
|
||||
/tools/kothic/ @comaps/styles
|
||||
# DevOps.
|
||||
/.forgejo/workflows @organicmaps/devops
|
||||
/android/*gradle* @organicmaps/devops
|
||||
/docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
||||
/xcode/fastlane/ @organicmaps/devops
|
||||
# Growth.
|
||||
README.md @organicmaps/growth
|
||||
/.forgejo/FUNDING.yml @organicmaps/growth
|
||||
/android/app/src/fdroid/play/ @organicmaps/growth
|
||||
/android/app/src/google/play/ @organicmaps/growth
|
||||
/iphone/metadata/ @organicmaps/growth
|
||||
/.forgejo/workflows @comaps/devops
|
||||
/android/*gradle* @comaps/devops
|
||||
/docs/RELEASE_MANAGEMENT.md @comaps/devops
|
||||
/xcode/fastlane/ @comaps/devops
|
||||
/tools/python/maps_generator/ @comaps/devops
|
||||
/generator/ @comaps/devops
|
||||
/topography_generator/ @comaps/devops
|
||||
/data/borders/ @comaps/devops
|
||||
/data/conf/isolines/ @comaps/devops
|
||||
/docs/SUBWAY_GENERATION.md @comaps/devops
|
||||
/docs/MAPS.md @comaps/devops
|
||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @comaps/devops
|
||||
# Legal.
|
||||
LEGAL @organicmaps/legal
|
||||
LICENSE @organicmaps/legal
|
||||
NOTICE @organicmaps/legal
|
||||
CONTRIBUTORS @organicmaps/legal
|
||||
/docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
||||
/docs/DCO.md @organicmaps/legal
|
||||
/docs/GOVERNANCE.md @organicmaps/legal
|
||||
LEGAL @comaps/admins
|
||||
LICENSE @comaps/admins
|
||||
NOTICE @comaps/admins
|
||||
CONTRIBUTORS @comaps/admins
|
||||
/docs/CODE_OF_CONDUCT.md @comaps/admins
|
||||
/docs/DCO.md @comaps/admins
|
||||
/docs/GOVERNANCE.md @comaps/admins
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
open_collective: comaps
|
||||
liberapay: comaps
|
||||
custom: ["https://comaps.app/donate/"]
|
||||
|
||||
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
open_collective: comaps
|
||||
liberapay: comaps
|
||||
custom: ["https://comaps.app/donate/"]
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -155,6 +155,8 @@ android/huawei-appgallery.json
|
||||
android/res/xml/network_security_config.xml
|
||||
./server/
|
||||
iphone/Maps/app.omaps/
|
||||
# Generated file
|
||||
libs/indexer/localized_types_map.cpp
|
||||
|
||||
*.li
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h480q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L240,520Z"
|
||||
android:pathData="M19,13H5v-2h14v2z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M440,520L240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h200v-200q0,-17 11.5,-28.5T480,200q17,0 28.5,11.5T520,240v200h200q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L520,520v200q0,17 -11.5,28.5T480,760q-17,0 -28.5,-11.5T440,720v-200Z"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
||||
android:fillColor="@android:color/white"/>
|
||||
</vector>
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||
android:tint="?iconTint"
|
||||
app:srcCompat="@drawable/ic_plus"
|
||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_marginBottom="@dimen/margin_half"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Minus"
|
||||
android:layout_marginBottom="@dimen/margin_eighth"
|
||||
android:contentDescription="@string/zoom_in"/>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/nav_zoom_out"
|
||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||
android:tint="?iconTint"
|
||||
app:srcCompat="@drawable/ic_minus"
|
||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Plus"
|
||||
android:contentDescription="@string/zoom_out"/>
|
||||
</LinearLayout>
|
||||
@@ -119,7 +119,7 @@
|
||||
<dimen name="nav_menu_landscape_width">360dp</dimen>
|
||||
|
||||
<dimen name="nav_frame_padding">@dimen/margin_half</dimen>
|
||||
<dimen name="zoom_buttons_margin">64dp</dimen>
|
||||
<dimen name="zoom_buttons_margin">58dp</dimen>
|
||||
<dimen name="map_buttons_bottom_margin">136dp</dimen>
|
||||
<dimen name="map_buttons_bottom_max_width">300dp</dimen>
|
||||
|
||||
|
||||
@@ -425,4 +425,17 @@
|
||||
<item name="android:maxWidth">@dimen/map_buttons_bottom_max_width</item>
|
||||
<item name="android:padding">@dimen/nav_frame_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.MapButton.Zoom.Plus" parent="">
|
||||
<item name="cornerSizeTopLeft">10%</item>
|
||||
<item name="cornerSizeTopRight">10%</item>
|
||||
<item name="cornerSizeBottomRight">50%</item>
|
||||
<item name="cornerSizeBottomLeft">50%</item>
|
||||
</style>
|
||||
<style name="ShapeAppearance.MapButton.Zoom.Minus" parent="">
|
||||
<item name="cornerSizeBottomLeft">10%</item>
|
||||
<item name="cornerSizeBottomRight">10%</item>
|
||||
<item name="cornerSizeTopLeft">50%</item>
|
||||
<item name="cornerSizeTopRight">50%</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -116,6 +116,9 @@ fi
|
||||
echo "Generating search categories / synonyms..."
|
||||
./tools/unix/generate_categories.sh
|
||||
|
||||
echo "Generating Desktop UI strings..."
|
||||
./tools/unix/generate_desktop_ui_strings.sh
|
||||
|
||||
if [ -z "$SKIP_GENERATE_SYMBOLS" ]; then
|
||||
if Diff data/symbols_hash data/styles/*/*/symbols/* || [ ! -z "$SYMBOLS_NOT_GENERATED" ]; then
|
||||
echo "Generating symbols..."
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
"place-state": "Щат|провинция",
|
||||
"place-region": "Район|Регион",
|
||||
"place-island|place-islet": "Остров",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|окръг|квартал|Предградие",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|окръг|квартал|Предградие|Жилищен комплекс|ж.к.|ЖК",
|
||||
"place-hamlet": "Село",
|
||||
"place-village": "Село",
|
||||
"place-locality": "местност|регион|Място",
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
"place-state": "Штат|провинция",
|
||||
"place-region": "Район",
|
||||
"place-island|place-islet": "Остров",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|квартал|Жилая зона",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|микрорайон|квартал|Жилая зона|Жилой комплекс|ж.к.|ЖК",
|
||||
"place-hamlet": "Посёлок|деревня",
|
||||
"place-village": "Деревня|поселок",
|
||||
"place-locality": "Местность|регион",
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"place-state": "Штат|провінція|регіон",
|
||||
"place-region": "Район|область",
|
||||
"place-island|place-islet": "Острів",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|мікрорайон|квартал|округа|Сусідство",
|
||||
"place-suburb|place-quarter|place-neighbourhood|landuse-residential": "Район|мікрорайон|квартал|округа|Сусідство|Житловий комплекс|ж.к.|ЖК",
|
||||
"place-hamlet": "Поселення|селище|село",
|
||||
"place-village": "Село|хутір|поселення",
|
||||
"place-locality": "Місцевість|регіон|Місце",
|
||||
|
||||
@@ -38,7 +38,7 @@ See [translations instructions](TRANSLATIONS.md) for details.
|
||||
CoMaps has a strong focus on easy to use UI and smooth user experience. Feel free to join UI/UX discussions in relevant issues. Mockups are very welcome!
|
||||
|
||||
If you're into graphic design then CoMaps needs good, clear and free-to-use icons for hundreds of map features / POIs.
|
||||
Check CoMaps' [design principles](https://codeberg.org/comaps/comaps/wiki/Design-Principles). Post your icons onto relevant issues or take a next step and [integrate them](STYLES.md) yourself.
|
||||
Check CoMaps' [design principles](https://codeberg.org/comaps/comaps/wiki/Design-Principles) and [color scheme](https://codeberg.org/comaps/Governance/src/branch/main/assets/comaps-color-scheme.png). Post your icons onto relevant issues or take a next step and [integrate them](STYLES.md) yourself.
|
||||
|
||||
Check the [map styling instructions](STYLES.md) and work on adding new map features and other open map styles issues.
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ The project consists of multiple components, each with its own translation files
|
||||
|
||||
Components without links haven't been integrated into Weblate and must be translated directly via [Codeberg Pull Requests](CONTRIBUTING.md).
|
||||
|
||||
TTS translations can be improved with [the TTS locale-viewer](https://comaps.codeberg.page/locale-viewer/).
|
||||
|
||||
## Translating
|
||||
|
||||
### Workflow
|
||||
|
||||
@@ -95,6 +95,9 @@ set(SRC
|
||||
interval_index_builder.hpp
|
||||
isolines_info.cpp
|
||||
isolines_info.hpp
|
||||
|
||||
|
||||
localized_types_map.cpp
|
||||
map_object.cpp
|
||||
map_object.hpp
|
||||
map_style.cpp
|
||||
|
||||
@@ -120,7 +120,6 @@ static std::pair<UniString, UniString> const kPreprocessReplacements[] = {
|
||||
{MakeUniString("ι.ν"), MakeUniString("ιερός ναός")},
|
||||
{MakeUniString("κων/νου"), MakeUniString("κωνσταντίνου")},
|
||||
{MakeUniString("д-р"), MakeUniString("доктор")},
|
||||
{MakeUniString("ж.к."), MakeUniString("жилищен комплекс")},
|
||||
{MakeUniString("м-н"), MakeUniString("микрорайон")},
|
||||
{MakeUniString("наб-я"), MakeUniString("набережная")},
|
||||
{MakeUniString("пр-д"), MakeUniString("проезд")},
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#include <ctime>
|
||||
#include "platform/localization.hpp"
|
||||
#include "indexer/localized_types_map.cpp"
|
||||
|
||||
namespace platform
|
||||
{
|
||||
std::string GetLocalizedTypeName(std::string const & type)
|
||||
{
|
||||
return type;
|
||||
auto key = "type." + type;
|
||||
std::replace(key.begin(), key.end(), '-', '.');
|
||||
std::replace(key.begin(), key.end(), ':', '_');
|
||||
auto const it = g_type2localizedType.find(key);
|
||||
std::string localizedName = (it != g_type2localizedType.end()) ? it->second : std::string();
|
||||
return localizedName.empty() ? type : localizedName;
|
||||
}
|
||||
|
||||
std::string GetLocalizedBrandName(std::string const & brand)
|
||||
|
||||
74
tools/python/generate_desktop_ui_strings.py
Executable file
74
tools/python/generate_desktop_ui_strings.py
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Generate localized_types_map.cpp from LocalizableTypes.strings
|
||||
|
||||
This script converts the iOS LocalizableTypes.strings file format to the desktop
|
||||
localized_types_map.cpp C++ map by:
|
||||
- Removing comments (/* ... */)
|
||||
- Removing empty lines
|
||||
- Converting from "key" = "value"; format to key=value format
|
||||
- Removing unnecessary quotes and spaces
|
||||
"""
|
||||
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
def parse_localizable_types_line(line):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
return None
|
||||
|
||||
if line.startswith('/*') or line.startswith('//') or line.startswith('/****'):
|
||||
return None
|
||||
|
||||
# Match pattern: "key" = "value";
|
||||
match = re.match(r'^"([^"]+)"\s*=\s*"([^"]*)"\s*;?\s*$', line)
|
||||
if match:
|
||||
key = match.group(1)
|
||||
value = match.group(2)
|
||||
return (key, value)
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def convert_to_localized_types_cpp(input_file, output_file):
|
||||
with open(input_file, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
entries = []
|
||||
for line_num, line in enumerate(lines, 1):
|
||||
try:
|
||||
parsed = parse_localizable_types_line(line)
|
||||
if parsed:
|
||||
key, value = parsed
|
||||
entries.append((key, value))
|
||||
except Exception as e:
|
||||
print(f"Warning: Error parsing line {line_num}: {e}")
|
||||
print(f" Line content: {line.strip()}")
|
||||
continue
|
||||
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
f.write('#pragma once\n\n')
|
||||
f.write('#include <string>\n')
|
||||
f.write('#include <unordered_map>\n\n')
|
||||
f.write('// This file is generated automatically. Do not edit.\n')
|
||||
f.write('// See: tools/python/generate_desktop_ui_strings.py\n')
|
||||
f.write('using Type2LocalizedType = std::unordered_map<std::string, std::string>;\n')
|
||||
f.write('const Type2LocalizedType g_type2localizedType = {\n')
|
||||
for i, (key, value) in enumerate(entries):
|
||||
comma = ',' if i < len(entries) - 1 else ''
|
||||
f.write(f' {{"{key}", "{value}"}}{comma}\n')
|
||||
f.write('};\n')
|
||||
print(f"Successfully converted {len(entries)} entries from '{input_file}' to '{output_file}'")
|
||||
|
||||
|
||||
def main():
|
||||
input_file = Path('iphone/Maps/LocalizedStrings/en.lproj/LocalizableTypes.strings')
|
||||
output_file = Path('libs/indexer/localized_types_map.cpp')
|
||||
convert_to_localized_types_cpp(str(input_file), str(output_file))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
2
tools/unix/generate_desktop_ui_strings.sh
Executable file
2
tools/unix/generate_desktop_ui_strings.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
./tools/python/generate_desktop_ui_strings.py
|
||||
Reference in New Issue
Block a user