mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-03-01 12:44:28 +00:00
feat(webapp): complete translations + Albanian (#9301)
This commit is contained in:
parent
732ac9a2ad
commit
d0348545ad
@ -1,17 +1,34 @@
|
|||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
ROOT_DIR=$(dirname "$0")/../..
|
ROOT_DIR=$(dirname "$0")/../..
|
||||||
|
LOCALES_DIR="$ROOT_DIR/webapp/locales"
|
||||||
|
|
||||||
sorting="jq -f $ROOT_DIR/scripts/translations/sort_filter.jq"
|
sorting="jq -f $ROOT_DIR/scripts/translations/sort_filter.jq"
|
||||||
english="$sorting $ROOT_DIR/webapp/locales/en.json"
|
english="$sorting $LOCALES_DIR/en.json"
|
||||||
german="$sorting $ROOT_DIR/webapp/locales/de.json"
|
|
||||||
listPaths="jq -c 'path(..)|[.[]|tostring]|join(\".\")'"
|
listPaths="jq -c 'path(..)|[.[]|tostring]|join(\".\")'"
|
||||||
diffString="<( $english | $listPaths ) <( $german | $listPaths )"
|
|
||||||
if eval "diff -q $diffString";
|
has_error=0
|
||||||
then
|
|
||||||
: # all good
|
for file in "$LOCALES_DIR"/*.json; do
|
||||||
else
|
lang=$(basename "$file" .json)
|
||||||
eval "diff -y $diffString | grep '[|<>]'";
|
|
||||||
printf "\nEnglish and German translation keys do not match, see diff above.\n"
|
# skip english itself
|
||||||
|
if [ "$lang" = "en" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
other="$sorting $file"
|
||||||
|
diffString="<( $english | $listPaths ) <( $other | $listPaths )"
|
||||||
|
|
||||||
|
if eval "diff -q $diffString" > /dev/null 2>&1; then
|
||||||
|
: # all good
|
||||||
|
else
|
||||||
|
eval "diff -y $diffString | grep '[|<>]'"
|
||||||
|
printf "\nEnglish and %s (%s) translation keys do not match, see diff above.\n\n" "$lang" "$file"
|
||||||
|
has_error=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$has_error" -eq 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
import { enUS, de, nl, fr, es, it, pt, pl, ru } from 'date-fns/locale'
|
import { enUS, de, nl, fr, es, it, pt, pl, ru, sq } from 'date-fns/locale'
|
||||||
import find from 'lodash/find'
|
import find from 'lodash/find'
|
||||||
|
|
||||||
const locales = [
|
const locales = [
|
||||||
@ -74,6 +74,14 @@ const locales = [
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
dateFnsLocale: ru,
|
dateFnsLocale: ru,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Shqip',
|
||||||
|
code: 'sq',
|
||||||
|
iso: 'sq-AL',
|
||||||
|
flag: '🇦🇱',
|
||||||
|
enabled: true,
|
||||||
|
dateFnsLocale: sq,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default locales
|
export default locales
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1281
webapp/locales/sq.json
Normal file
1281
webapp/locales/sq.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user