Skip to content

Commit

Permalink
merge-i18n
Browse files Browse the repository at this point in the history
don't add theme based modifications into `src/assets/i18n/*.json5`
directly. Use a script instead to merge them

```
for langfile in src/themes/ukrepo/assets/i18n/*.json5; do
 f=$(basename $langfile);
 grep : $langfile | while read -r line; do
  key=$(echo $line | sed -e 's/\s*:.*//');
  sed -i -e "/^\s\+$key/s/^\(\s*\).*/\1$line/" src/assets/i18n/$f ;
 done ;
done
```

Note that wiki https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Customization#UserInterfaceCustomization-CustomizeUIlabelsusingInternationalization(i18n)files
suggests

```
yarn merge-i18n -s src/themes/ukrepo/assets/i18n
```

but that removes comments and the linter was not very happy with the
result either.
  • Loading branch information
kosarko committed Nov 12, 2024
1 parent 8207173 commit b9ac411
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/assets/i18n/cs.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2383,7 +2383,7 @@
// "home.top-level-communities.help": "Select a community to browse its collections.",
"home.top-level-communities.help": "Vyberte komunitu a procházejte její kolekce.",
// "home-page.carousel.ldata.info": "Linguistic Data and NLP Tools",
"home-page.carousel.ldata.info": "Lingvistická data a nástroje",
"home-page.carousel.ldata.info": "Data a nástroje",
// "home-page.carousel.ldata.find": "Find",
"home-page.carousel.ldata.find": "Vyhledávání",
// "home-page.carousel.ldata.citation-support": "Citation Support (with Persistent IDs)",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@
"home.top-level-communities.help": "Select a community to browse its collections.",


"home-page.carousel.ldata.info": "Linguistic Data and NLP Tools",
"home-page.carousel.ldata.info": "Data and Tools",

"home-page.carousel.ldata.find": "Find",

Expand Down
2 changes: 1 addition & 1 deletion src/themes/ukrepo/assets/i18n/cs.json5
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"home-page.carousel.ldata.info" : "Data a nástroje"
"home-page.carousel.ldata.info": "Data a nástroje",
}

0 comments on commit b9ac411

Please sign in to comment.