Skip to content

Commit

Permalink
Merge branch 'Iternio-Planning-AB:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontane authored Dec 3, 2024
2 parents 4506822 + 671e308 commit 1a516fd
Show file tree
Hide file tree
Showing 9 changed files with 421 additions and 284 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/validate-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Workflow: JSON Validation for ABRP Translations
# Purpose:
# Automatically validates JSON formatting in translation files and provides
# helpful feedback when issues are found. Comments on the PR with validation results.
#
# Frequency:
# - Runs on every PR that modifies JSON files
#
# Prerequisites:
# - None, uses default GitHub token for authentication

name: Validate JSON
run-name: "JSON Validation for PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"

on:
pull_request:
paths:
- '**.json'

permissions:
pull-requests: write
contents: read

jobs:
validate-json:
name: Validate Translation Files
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Get Changed Files
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: '**.json'

- name: Validate JSON Files
id: validate
run: |
ERROR_LOG=""
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [ -f "$file" ]; then
echo "Validating $file"
ERROR_OUTPUT=$(jq empty "$file" 2>&1 || true)
if [ ! -z "$ERROR_OUTPUT" ]; then
LINE_NUM=$(echo "$ERROR_OUTPUT" | grep -o "line [0-9]*" | cut -d' ' -f2)
ERROR_LOG="$ERROR_LOG\n• $file (line $LINE_NUM): $ERROR_OUTPUT"
fi
fi
done
if [ ! -z "$ERROR_LOG" ]; then
echo "error_log<<EOF" >> $GITHUB_ENV
echo "$ERROR_LOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
exit 1
fi
- name: Comment Validation Results
if: always()
uses: actions/github-script@v7
env:
ERROR_LOG: ${{ env.error_log }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = failure() ?
`### ❌ JSON Validation Failed
Hello @${{ github.actor }}, thank you for your translation contribution! We found some formatting issues:
\`\`\`
${process.env.ERROR_LOG || 'No specific error details available'}
\`\`\`
#### Common JSON Format Rules:
1️⃣ Check for missing commas between items:
\`\`\`json
{
"key1": "value1", // ✅ Correct - has comma
"key2": "value2" // ✅ Correct - no comma on last item
}
\`\`\`
2️⃣ Make sure quotes are properly closed:
\`\`\`json
"key": "correct value", // ✅ Correct
"key": "missing quote, // ❌ Wrong
\`\`\`
Need help? Feel free to ask and we'll assist you! Your contribution helps make ABRP accessible to more users worldwide. 🌍`
:
`### ✅ JSON Format Validation Passed
Thank you @${{ github.actor }} for your translation contribution! The file format looks good and we'll review your changes soon.
Your help in making ABRP accessible to more users is greatly appreciated! 🌟
__Action__: \`${{ github.event_name }}\`
__Files Changed__: \`${{ steps.changed-files.outputs.all_changed_files }}\``;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
51 changes: 40 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,49 @@
# Translation files for the ABetterRouteplanner app
# Welcome to ABetterRouteplanner Translations! 🌍

This repository contains translation files for the ABetterRouteplanner (ABRP) app, which is available at https://abetterrouteplanner.com
as well as at https://apps.apple.com/us/app/a-better-routeplanner-abrp/id1490860521 and https://play.google.com/store/apps/details?id=com.iternio.abrpapp .
Thank you for your interest in helping make ABRP ([ABetterRouteplanner](https://abetterrouteplanner.com)) accessible to more users around the world! This repository contains translation files for our app, which helps EV drivers plan their journeys efficiently.

If you would like to contribute translations for your language, or just improve on the existing translations, feel free to either;
## 🚀 How to Contribute

1. Make edits directly here in github by clicking the 'pen icon' at the top right of the file you wish to edit and submit a pullrequest or...
You can help in two ways:

2. Download the files in this repo and email us your updated version at [email protected] or submit a pullrequest here at GitHub.
1. **Directly on GitHub** (Recommended):
- Find your language file (e.g., `es.json` for Spanish)
- Click the 'pen icon' (✏️) at the top right of the file
- Make your translations
- Submit a pull request

The translations themselves are published under the open Apache license, however the app sourcecode itself is not open.
2. **Via Email**:
- Download the files
- Make your translations
- Send to [email protected] or submit a pull request

Thank you so much for helping out!
## 📝 Translation Guidelines

Bo and the Iternio Team
1. Only edit the text after the colon. Example:
```json
"welcome_message": "Welcome to ABRP" // Only translate "Welcome to ABRP"
```

---
2. Keep special placeholders unchanged:
```json
"hello_user": "Hello {{username}}" // Keep {{username}} as is
```

If you'd like to be part of our beta testers group, here's a [Apple Testflight invite URL](https://testflight.apple.com/join/uX9LuvcQ).
3. Maintain all punctuation and formatting symbols

## 📱 Get the App

- [iOS App Store](https://apps.apple.com/us/app/a-better-routeplanner-abrp/id1490860521)
- [Google Play Store](https://play.google.com/store/apps/details?id=com.iternio.abrpapp)

Want to try new features early? Join our [iOS beta testing program](https://testflight.apple.com/join/uX9LuvcQ)!

## ⚖️ License

The translations are published under the Apache license. The app source code itself is not open source.

## 💕 Thank You!

Your contributions help make electric vehicle journey planning accessible to everyone. We truly appreciate your help!

~ Bo and the Iternio Team
42 changes: 21 additions & 21 deletions cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2168,24 +2168,24 @@
"live_data_share_group_share_vehicles": "Sdílet vozidla",
"live_data_share_group_no_members": "Tato skupina nemá ještě žádného člena",
"no_car_models_found": "Zdá se, že nemáme model vozu, který hledáte; požádejte o vozidlo.",
"navigation_notification_title": "Navigation ongoing",
"car_models_no_car_models_found": "It seems like we don't have a vehicle model that you are looking for. Feel free to submit a request for it if you like.",
"charge_cards_no_charge_cards_found": "It seems like we don't have a charge card that you are looking for. Feel free to submit a request for it if you like.",
"networks_no_networks_found": "It seems like we don't have a network that you are looking for. Feel free to submit a request for it if you like.",
"charge_cards_request_charge_card": "Request a charge card",
"networks_request_network": "Request a network",
"tts_options": "Voice",
"tts_options_description": "Configure navigation voice options",
"voices": "Voices",
"no_voices_found": "No voices found, using system default",
"voice_engines": "Voice engines",
"no_voice_engine_installed": "No voice engine installed",
"restart_required": "A restart of the app might be required when installing new engines",
"please_wait_for_voice_engines": "Please wait for voice engines to be loaded",
"please_wait_for_voices": "Please wait for voices to be loaded",
"test_tts": "Test voice",
"requires_tts_install": "Not installed language files will be downloaded automatically, requires network connection",
"no_enhanced_voice_found": "You do not seem to have voices with enhanced quality installed, you can do so by navigating to your voice settings in system settings",
"install_voices": "Install voices",
"install_voice_engine": "Click {{settings}} to configure TTS engine, or click {{ignore}}, to disable voice output"
}
"navigation_notification_title": "Probíhá navigace",
"car_models_no_car_models_found": "Zdá se, že nemáme model vozidla, který hledáte. Pokud chcete, můžete o něj požádat.",
"charge_cards_no_charge_cards_found": "Zdá se, že nemáme kartu, kterou hledáte. Pokud chcete, můžete o ni požádat.",
"networks_no_networks_found": "Zdá se, že nemáme síť, kterou hledáte. Pokud chcete, můžete o ni požádat.",
"charge_cards_request_charge_card": "Požádat o nabíjecí kartu",
"networks_request_network": "Požádat o síť",
"tts_options": "Hlas",
"tts_options_description": "Nastaví volby hlasové navigace.",
"voices": "Hlasy",
"no_voices_found": "Nebyly nalezeny žádné hlasy; bude použit výchozí systémový hlas",
"voice_engines": "Hlasová rozhraní",
"no_voice_engine_installed": "Není nainstalováno žádné hlasové rozhraní",
"restart_required": "Při instalaci nových rozhraní může být nutné aplikaci restartovat.",
"please_wait_for_voice_engines": "Počkejte na načtení hlasových rozhraní",
"please_wait_for_voices": "Počkejte na načtení hlasů",
"test_tts": "Otestovat hlas",
"requires_tts_install": "Neinstalované jazykové soubory se stáhnou automaticky, vyžaduje se připojení k síti",
"no_enhanced_voice_found": "Zdá se, že nemáte nainstalované hlasy s vylepšenou kvalitou. Můžete tak učinit v nastavení hlasu v nastavení systému.",
"install_voices": "Nainstalovat hlasy",
"install_voice_engine": "Klepněte na {{settings}} pro nastavení rozhraní TTS nebo klepněte na {{ignore}} pro zakázání hlasového výstupu"
}
2 changes: 1 addition & 1 deletion en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@
"live_data_sharing_groups": "Live data groups",
"live_data_sharing_groups_short": "Groups",
"live_data_share_group_members_list": "Group participants",
"live_data_share_add_vehicle_group": "Add your vheicles to the group",
"live_data_share_add_vehicle_group": "Add your vehicles to the group",
"live_data_share_group_share_vehicles": "Share vehicles",
"live_data_share_group_no_members": "This group has no members yet",
"no_car_models_found": "It seems like we don't have a car model that you are looking for, please request a vehicle.",
Expand Down
42 changes: 21 additions & 21 deletions fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2168,24 +2168,24 @@
"live_data_share_group_share_vehicles": "Jaa ajoneuvoja",
"live_data_share_group_no_members": "Tässä ryhmässä ei ole vielä jäseniä",
"no_car_models_found": "Näyttää siltä, ​​​​että meillä ei ole etsimääsi automallia, pyydä ajoneuvoa.",
"navigation_notification_title": "Navigation ongoing",
"car_models_no_car_models_found": "It seems like we don't have a vehicle model that you are looking for. Feel free to submit a request for it if you like.",
"charge_cards_no_charge_cards_found": "It seems like we don't have a charge card that you are looking for. Feel free to submit a request for it if you like.",
"networks_no_networks_found": "It seems like we don't have a network that you are looking for. Feel free to submit a request for it if you like.",
"charge_cards_request_charge_card": "Request a charge card",
"networks_request_network": "Request a network",
"tts_options": "Voice",
"tts_options_description": "Configure navigation voice options",
"voices": "Voices",
"no_voices_found": "No voices found, using system default",
"voice_engines": "Voice engines",
"no_voice_engine_installed": "No voice engine installed",
"restart_required": "A restart of the app might be required when installing new engines",
"please_wait_for_voice_engines": "Please wait for voice engines to be loaded",
"please_wait_for_voices": "Please wait for voices to be loaded",
"test_tts": "Test voice",
"requires_tts_install": "Not installed language files will be downloaded automatically, requires network connection",
"no_enhanced_voice_found": "You do not seem to have voices with enhanced quality installed, you can do so by navigating to your voice settings in system settings",
"install_voices": "Install voices",
"install_voice_engine": "Click {{settings}} to configure TTS engine, or click {{ignore}}, to disable voice output"
}
"navigation_notification_title": "Navigointi käynnissä",
"car_models_no_car_models_found": "Näyttää siltä, ​​​​että meillä ei ole etsimääsi ajoneuvomallia. Voit vapaasti lähettää sitä koskevan pyynnön, jos haluat.",
"charge_cards_no_charge_cards_found": "Näyttää siltä, ​​​​että meillä ei ole etsimääsi maksukorttia. Voit vapaasti lähettää sitä koskevan pyynnön, jos haluat.",
"networks_no_networks_found": "Näyttää siltä, ​​​​että meillä ei ole etsimääsi verkkoa. Voit vapaasti lähettää sitä koskevan pyynnön, jos haluat.",
"charge_cards_request_charge_card": "Pyydä maksukorttia",
"networks_request_network": "Pyydä verkkoa",
"tts_options": "Ääni",
"tts_options_description": "Määritä navigoinnin ääniasetukset",
"voices": "Äänet",
"no_voices_found": "Ääniä ei löytynyt, käytetään järjestelmän oletusarvoa",
"voice_engines": "Puhemoottorit",
"no_voice_engine_installed": "Puhemoottoria ei ole asennettu",
"restart_required": "Sovellus saattaa olla tarpeen käynnistää uudelleen, kun uusia moottoreita asennetaan",
"please_wait_for_voice_engines": "Odota, että puhemoottorit latautuvat",
"please_wait_for_voices": "Odota, että äänet latautuvat",
"test_tts": "Testiääni",
"requires_tts_install": "Asentamattomat kielitiedostot ladataan automaattisesti, vaatii verkkoyhteyden",
"no_enhanced_voice_found": "Sinulla ei näytä olevan asennettuna parempilaatuisia ääniä, voit tehdä sen siirtymällä ääniasetuksiin järjestelmäasetuksissa",
"install_voices": "Asenna ääniä",
"install_voice_engine": "Napsauta {{settings}} määrittääksesi TTS-moottorin, tai napsauta {{ignore}}, jos haluat poistaa äänentoiston käytöstä."
}
Loading

0 comments on commit 1a516fd

Please sign in to comment.