Skip to content

Commit

Permalink
[welcome] fixed handling of some language translations
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-192 committed Nov 29, 2024
1 parent 7cfff64 commit ae6b30c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions welcome
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@ LangChoose() {
"Icelandic (Íoslainnis)" is_IS
"Italian (Italiano・Italiana)" it_IT
"Japanese (日本語)" ja_JP
"Dutch (Nederlands)" nl_NL
"Polish (Polski)" pl_PL
"Portuguese (Português)" pt_PT
"Portuguese-Brazil (Português-Brasil)" pt_BR
Expand Down Expand Up @@ -1347,10 +1348,11 @@ LangChoose() {
export -f LangChoose

LangImplConvert() {
# convert user given language to supported translations in package eos-translations
# convert user given language spec to support translation files in package eos-translations
lang=${lang%%.*} # skip stuff after the dot, e.g. 'nl_NL.UTF-8' to 'nl_NL'
case "$lang" in
pt_BR | zh_?? | uk_UA) ;;
*) lang=${lang%%_*} ;;
pt_BR | zh_?? | uk_UA | nl_NL) ;;
*) lang=${lang%%_*} ;; # for the rest we have only support for 'xx' from 'xx_YY'
esac
}
export -f LangImplConvert
Expand Down Expand Up @@ -1525,15 +1527,16 @@ StartHere() {
--verboselog) ;;
--genlang=*)
lang="${arg#*=}"
LangImplConvert
_init_translations --tr-engine="$tr_engine" --generate "$lang"
return
;;
esac
done
if [ "$is_installing" = "no" ] && [ -z "$lang" ] ; then
lang="$LANG"
LangImplConvert
fi
LangImplConvert

BreakPoint

Expand Down

0 comments on commit ae6b30c

Please sign in to comment.