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

New Crowdin updates #443

Merged
merged 38 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0e9bfaa
New translations fields.json (Romanian)
m-mohr Jun 7, 2024
1b7759a
New translations texts.json (Romanian)
m-mohr Jun 7, 2024
420b149
New translations fields.json (French)
m-mohr Jun 7, 2024
ebe079e
New translations fields.json (Spanish)
m-mohr Jun 7, 2024
6555009
New translations fields.json (German)
m-mohr Jun 7, 2024
f571bef
New translations fields.json (Italian)
m-mohr Jun 7, 2024
1f4c6f0
New translations fields.json (Japanese)
m-mohr Jun 7, 2024
ca6958f
New translations texts.json (Japanese)
m-mohr Jun 7, 2024
0663394
New translations fields.json (Portuguese, Brazilian)
m-mohr Jun 7, 2024
ceca0df
New translations fields.json (Portuguese)
m-mohr Jun 7, 2024
a3bb929
New translations fields.json (English, United Kingdom)
m-mohr Jun 7, 2024
753666b
New translations texts.json (Portuguese)
m-mohr Jun 7, 2024
c62ef42
New translations texts.json (English, United Kingdom)
m-mohr Jun 7, 2024
8adc4e1
New translations fields.json (French)
m-mohr Jun 7, 2024
ec6eca3
New translations texts.json (French)
m-mohr Jun 7, 2024
377a080
New translations fields.json (English, United Kingdom)
m-mohr Jun 7, 2024
320d833
New translations texts.json (English, United Kingdom)
m-mohr Jun 7, 2024
ab198ec
CI to fix CrowdIn commits
m-mohr Jun 7, 2024
4109deb
Fix CrowdIn [skipci]
m-mohr Jun 7, 2024
8f8e940
Update source file fields.json
m-mohr Jun 7, 2024
19ab9c4
:robot: Automated update for locales: Fri Jun 7 22:08:25 UTC 2024 [s…
Jun 7, 2024
82f587b
Update source file fields.json
m-mohr Jun 7, 2024
17ae362
New translations fields.json (Romanian)
m-mohr Jun 7, 2024
0721222
New translations texts.json (Romanian)
m-mohr Jun 7, 2024
dae4cbd
New translations fields.json (French)
m-mohr Jun 7, 2024
6aa0aac
New translations fields.json (Spanish)
m-mohr Jun 7, 2024
130ac64
New translations fields.json (German)
m-mohr Jun 7, 2024
ab70379
New translations fields.json (Italian)
m-mohr Jun 7, 2024
2614e18
New translations fields.json (Japanese)
m-mohr Jun 7, 2024
5cdccc6
New translations texts.json (Japanese)
m-mohr Jun 7, 2024
e3e4c72
New translations fields.json (Portuguese, Brazilian)
m-mohr Jun 7, 2024
d6c4873
New translations fields.json (Portuguese)
m-mohr Jun 7, 2024
212c8ad
New translations fields.json (English, United Kingdom)
m-mohr Jun 7, 2024
8b21125
New translations texts.json (Portuguese)
m-mohr Jun 7, 2024
18e8433
New translations texts.json (English, United Kingdom)
m-mohr Jun 7, 2024
f37e03c
:robot: Automated update for locales: Fri Jun 7 22:10:52 UTC 2024 [s…
Jun 7, 2024
c90a0e3
Fix CI
m-mohr Jun 7, 2024
9f960f9
Fix CI
m-mohr Jun 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ files:
- config.json
- custom.json
translation: /src/locales/%locale%/%original_file_name%
pull_request_title: "Update translations"
pull_request_labels: [
"i18n / l10n",
"CI run required"
]
6 changes: 3 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: npm install
- run: npm run build -- --pathPrefix="/stac-browser" --historyMode=hash
- uses: peaceiris/actions-gh-pages@v3
Expand All @@ -19,4 +19,4 @@ jobs:
publish_dir: dist
exclude_assets: 'report.html'
user_name: 'STAC Browser CI'
user_email: [email protected]
user_email: [email protected]
26 changes: 26 additions & 0 deletions .github/workflows/fix-i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fix CrowdIn commits
on:
pull_request:
types:
- unlabeled
jobs:
deploy:
if: ${{ github.event.label.name == 'CI run required' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: actions/checkout@v4
- run: npm install
- run: node helpers/fix-crowdin.js
- name: Commit changes
run: |
git config user.name "STAC Browser CI"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m ":robot: Automated update for locales: ${timestamp} [skip ci]" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions helpers/fix-crowdin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const fs = require('fs');
const path = require('path');

// Function to read JSON file
const readJsonFile = (filePath) => {
try {
const data = fs.readFileSync(filePath, 'utf8');
return JSON.parse(data);
} catch (err) {
console.error(`Error reading file from disk: ${err}`);
return null;
}
};

// Function to write JSON file
const writeJsonFile = (filePath, data) => {
try {
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n", 'utf8');
console.log(`File has been written: ${filePath}`);
} catch (err) {
console.error(`Error writing file to disk: ${err}`);
}
};

// Function to remove empty strings from an object deeply
const removeEmptyStrings = (obj) => {
if (Array.isArray(obj)) {
return obj.map(removeEmptyStrings).filter((item) => item !== '');
} else if (obj !== null && typeof obj === 'object') {
return Object.entries(obj)
.filter(entry => entry[1] !== '')
.reduce((acc, [k, v]) => {
acc[k] = removeEmptyStrings(v);
return acc;
}, {});
}
return obj;
};

// Main function to process the locales directory
const processLocales = (localesDir) => {
const folders = fs.readdirSync(localesDir);

folders.forEach((folder) => {
const folderPath = path.join(localesDir, folder);

if (fs.statSync(folderPath).isDirectory()) {
['texts.json', 'fields.json'].forEach((fileName) => {
const filePath = path.join(folderPath, fileName);
if (fs.existsSync(filePath)) {
const jsonData = readJsonFile(filePath);
if (jsonData) {
const cleanedData = removeEmptyStrings(jsonData);
writeJsonFile(filePath, cleanedData);
}
}
});
}
});
};

// Execute the main function
processLocales('src/locales');
7 changes: 7 additions & 0 deletions src/locales/de/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
"Number": "Nummer",
"Number of Points": "Anzahl der Punkte",
"Number of bits": "Anzahl der Bits",
"Number of samples": "Anzahl an Proben",
"OGC Web Map Service (WMS)": "OGC Web Map Service (WMS)",
"OGC Web Map Tile Service (WMTS)": "Kartendienst: OGC WMTS",
"Observation Direction": "Beobachtungsrichtung",
Expand Down Expand Up @@ -293,6 +294,7 @@
"Path": "Pfad",
"Path Template": "Pfad-Vorlage",
"Pending (waiting for activation)": "Ausstehend (wartet auf Aktivierung)",
"Percentage of samples": "Prozentsatz der Proben",
"Percentage of valid pixels": "Prozentsatz der gültigen Pixel",
"Personal": "Persönlich",
"Phone": "Telefon",
Expand All @@ -316,7 +318,10 @@
"Processing Instructions": "Prozessierungsanweisungen",
"Processing Level": "Prozessierungslevel",
"Processing Status": "Status der Prozessierung",
"Processing Time": "Zeitpunkt der Prozessierung",
"Processing inctructions/code": "Prozessierungsanweisungen/-quelltext",
"Processor Version": "Prozessor-Version",
"Product": "Produkt",
"Product ID": "Produkt-Kennung",
"Product Type": "Produktart",
"Product Variant": "Produkt-Variante",
Expand Down Expand Up @@ -447,6 +452,8 @@
"Time of Data": "Zeitstempel der Daten",
"Time of Data begins": "Erster Zeitstempel der Daten",
"Time of Data ends": "Letzter Zeitstempel der Daten",
"Timeliness": "Zeitrahmen",
"Timeliness Category": "Zeitrahmen-Kategorie",
"Title": "Titel",
"Transformation Matrix": "Transformationsmatrix",
"Transparency": "Transparenz",
Expand Down
62 changes: 61 additions & 1 deletion src/locales/en-GB/texts.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,81 @@
{
"actions": {},
"anonymized": {
"title": "Anonymised"
},
"assets": {
"alternate": {},
"copyGdalVfsUrl": {},
"copyUrl": {},
"download": {},
"role": {}
},
"authentication": {
"button": {}
},
"catalog": {},
"catalogs": {
"filterByTitle": "Filter catalogues by title",
"filterByTitleAndMore": "Filter catalogues by title, description or keywords",
"noMatches": "No catalogues match the given search criteria."
},
"checkbox": {},
"deprecation": {},
"errors": {
"labels": {},
"noExternalAccess": "Accessing external catalogues is not allowed!"
},
"fullscreen": {},
"goBack": {},
"goToCollection": {},
"goToParent": {},
"index": {
"catalog": "Catalogue",
"specifyCatalog": "Please specify a STAC Catalogue or API..."
},
"items": {},
"leaflet": {
"stayLayer": {},
"zoom": {
"in": {},
"out": {}
}
},
"metadata": {},
"multiselect": {},
"pagination": {},
"protocol": {
"s3": {}
},
"providers": {
"role": {}
},
"read": {},
"search": {
"logical": {},
"sortOptions": {},
"tabs": {}
},
"sidebar": {
"switchCatalog": "Switch Catalogue"
},
"stacCatalog": "Catalogue | Catalogues"
"sort": {
"asc": {},
"desc": {}
},
"source": {
"language": {},
"share": {},
"validationParams": {},
"validationReport": {}
},
"stacCatalog": "Catalogue | Catalogues",
"table": {
"sort": {}
},
"tree": {},
"view": {
"list": {},
"tiles": {}
}
}
2 changes: 1 addition & 1 deletion src/locales/en/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,4 +528,4 @@
"°E": "°E",
"°N": "°N",
"μm": "μm"
}
}
1 change: 1 addition & 0 deletions src/locales/ja/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"title": "ソースデータ",
"valid": "有効",
"validating": "検証中...",
"validationParams": {},
"validationReport": {
"disclaimer": "検証レポートはスキーマに基づいて生成されますが、網羅していないことがあります。 これらはSTAC仕様とその拡張のすべてをカバーするわけではありません。 この検証レポートは、STACエンティティが仕様およびその拡張に完全に準拠している保証ではありません。",
"result": "結果",
Expand Down
21 changes: 7 additions & 14 deletions src/locales/ro/texts.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"actions": {
},
"actions": {},
"additionalResources": "Resurse suplimentare",
"anonymized": {
"title": "Anonimizat"
},
"assets": {
"alternate": {
},
"alternate": {},
"copyGdalVfsUrl": {
"generic": "Copiați link-ul GDAL VFS",
"withSource": "Copiați link-ul GDAL VFS al {source}"
Expand Down Expand Up @@ -99,8 +97,7 @@
"exit": "Ieși din modul ecran complet",
"show": "Vizualizați pe tot ecranul"
},
"goBack": {
},
"goBack": {},
"goToCollection": {
"description": "Accesați colecția asociată",
"descriptionWithTitle": "@:goToCollection.description: {title}",
Expand Down Expand Up @@ -208,8 +205,7 @@
"itemsPerPageDescription": "Număr de elemente solicitate pe pagină, max. {maxItems} elemente",
"lessThan": "mai puțin decât",
"likeOperatorDescription": "Puteți folosi metacaracterele. `_` se potrivește cu un singur caracter, `%` se potrivește cu orice număr de caractere. Pentru a căuta în mod specific un wildcard, trebuie să adăugați un `\\` în fața caracterului.",
"logical": {
},
"logical": {},
"matches": "corespunde cu",
"metaDescription": "Căutați în oferta de date a {title}.",
"modifyCriteria": "Vă rugăm să modificați criteriile de căutare.",
Expand All @@ -226,8 +222,7 @@
"title": "Titlu"
},
"spatialExtent": "Întinderea spațială",
"tabs": {
},
"tabs": {},
"temporalExtent": "Interval de timp",
"title": "Căutare"
},
Expand Down Expand Up @@ -273,10 +268,8 @@
"valid": "Valid",
"validating": "Validare...",
"validationNA": "n.a.",
"validationParams": {
},
"validationReport": {
}
"validationParams": {},
"validationReport": {}
},
"stacAssets": "Resursă | Resurse",
"stacCatalog": "Catalog | Cataloage",
Expand Down