Update
This commit is contained in:
parent
76f1741d3e
commit
18391d874b
|
@ -1,15 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
|
||||
#patreon: # Replace with a single Patreon username
|
||||
#open_collective: # Replace with a single Open Collective username
|
||||
#ko_fi: # Replace with a single Ko-fi username
|
||||
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
#liberapay: # Replace with a single Liberapay username
|
||||
#issuehunt: # Replace with a single IssueHunt username
|
||||
#otechie: # Replace with a single Otechie username
|
||||
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
#github: [Valeria-Fadeeva]
|
||||
custom: ["https://www.tinkoff.ru/rm/fadeeva.valeriya96/9bLRi79066", "https://yoomoney.ru/to/4100115921160758", "https://qiwi.com/n/VALERIAFADEEVA", "valeria.fadeeva.me"]
|
Binary file not shown.
|
@ -38,12 +38,12 @@ Item {
|
|||
}
|
||||
|
||||
Button {
|
||||
text: i18n("Проверить обновления")
|
||||
text: i18n("Check updates")
|
||||
onClicked: updater.checkUpdates()
|
||||
}
|
||||
|
||||
Button {
|
||||
text: i18n("Установить обновления")
|
||||
text: i18n("Install updates")
|
||||
onClicked: updater.upgrade()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
> Version 7 of Zren's i18n scripts.
|
||||
|
||||
With KDE Frameworks v5.37 and above, translations are bundled with the `*.plasmoid` file downloaded from the store.
|
||||
|
||||
## Install Translations
|
||||
|
||||
Go to `~/.local/share/plasma/plasmoids/com.github.Melawy.ArchUpdate/translate/` and run `sh ./build --restartplasma`.
|
||||
|
||||
## New Translations
|
||||
|
||||
1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/exequtic/apdatifier/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop).
|
||||
|
||||
Or if you know how to make a pull request
|
||||
|
||||
1. Copy the `template.pot` file and name it your locale's code (Eg: `en`/`de`/`fr`) with the extension `.po`. Then fill out all the `msgstr ""`.
|
||||
|
||||
## Scripts
|
||||
|
||||
* `sh ./merge` will parse the `i18n()` calls in the `*.qml` files and write it to the `template.pot` file. Then it will merge any changes into the `*.po` language files.
|
||||
* `sh ./build` will convert the `*.po` files to it's binary `*.mo` version and move it to `contents/locale/...` which will bundle the translations in the `*.plasmoid` without needing the user to manually install them.
|
||||
|
||||
## Links
|
||||
|
||||
* https://zren.github.io/kde/docs/widget/#translations-i18n
|
||||
* https://github.com/Zren/plasma-applet-lib/tree/master/package/translate
|
||||
|
||||
## Status
|
||||
| Locale | Lines | % Done|
|
||||
|----------|---------|-------|
|
||||
| Template | 9 | |
|
||||
| ru_RU | 8/9 | 88% |
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
# Version: 6
|
||||
|
||||
# This script will convert the *.po files to *.mo files, rebuilding the package/contents/locale folder.
|
||||
# Feature discussion: https://phabricator.kde.org/D5209
|
||||
# Eg: contents/locale/fr_CA/LC_MESSAGES/plasma_applet_org.kde.plasma.eventcalendar.mo
|
||||
|
||||
DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`
|
||||
plasmoidName=com.github.Melawy.ArchUpdate
|
||||
widgetName="${plasmoidName##*.}" # Strip namespace
|
||||
website=https://melawy.ru
|
||||
bugAddress="$website"
|
||||
packageRoot=".." # Root of translatable sources
|
||||
projectName="plasma_applet_${plasmoidName}" # project name
|
||||
|
||||
#---
|
||||
if [ -z "$plasmoidName" ]; then
|
||||
echo "[build] Error: Couldn't read plasmoidName."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$(which msgfmt)" ]; then
|
||||
echo "[build] Error: msgfmt command not found. Need to install gettext"
|
||||
echo "[build] Running 'sudo apt install gettext'"
|
||||
sudo apt install gettext
|
||||
echo "[build] gettext installation should be finished. Going back to installing translations."
|
||||
fi
|
||||
|
||||
#---
|
||||
echo "[build] Compiling messages"
|
||||
|
||||
catalogs=`find . -name '*.po' | sort`
|
||||
for cat in $catalogs; do
|
||||
echo "$cat"
|
||||
catLocale=`basename ${cat%.*}`
|
||||
msgfmt -o "${catLocale}.mo" "$cat"
|
||||
|
||||
installPath="$DIR/../contents/locale/${catLocale}/LC_MESSAGES/${projectName}.mo"
|
||||
|
||||
echo "[build] Install to ${installPath}"
|
||||
mkdir -p "$(dirname "$installPath")"
|
||||
mv "${catLocale}.mo" "${installPath}"
|
||||
done
|
||||
|
||||
echo "[build] Done building messages"
|
||||
|
||||
if [ "$1" = "--restartplasma" ]; then
|
||||
echo "[build] Restarting plasmashell"
|
||||
killall plasmashell
|
||||
kstart5 plasmashell
|
||||
echo "[build] Done restarting plasmashell"
|
||||
else
|
||||
echo "[build] (re)install the plasmoid and restart plasmashell to test."
|
||||
fi
|
|
@ -0,0 +1,165 @@
|
|||
#!/bin/bash
|
||||
# Version: 22
|
||||
|
||||
# https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems
|
||||
# https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems/Outside_KDE_repositories
|
||||
# https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/extract-messages.sh
|
||||
|
||||
DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`
|
||||
plasmoidName=com.github.Melawy.ArchUpdate
|
||||
widgetName="${plasmoidName##*.}" # Strip namespace
|
||||
website=https://melawy.ru
|
||||
bugAddress="$website"
|
||||
packageRoot=".." # Root of translatable sources
|
||||
projectName="plasma_applet_${plasmoidName}" # project name
|
||||
|
||||
#---
|
||||
if [ -z "$plasmoidName" ]; then
|
||||
echo "[merge] Error: Couldn't read plasmoidName."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$(which xgettext)" ]; then
|
||||
echo "[merge] Error: xgettext command not found. Need to install gettext"
|
||||
echo "[merge] Running 'sudo apt install gettext'"
|
||||
sudo apt install gettext
|
||||
echo "[merge] gettext installation should be finished. Going back to merging translations."
|
||||
fi
|
||||
|
||||
#---
|
||||
echo "[merge] Extracting messages"
|
||||
potArgs="--from-code=UTF-8 --width=200 --add-location=file"
|
||||
|
||||
# See Ki18n's extract-messages.sh for a full example:
|
||||
# https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/extract-messages.sh#L25
|
||||
# The -kN_ and -kaliasLocale keywords are mentioned in the Outside_KDE_repositories wiki.
|
||||
# We don't need -kN_ since we don't use intltool-extract but might as well keep it.
|
||||
# I have no idea what -kaliasLocale is used for. Googling aliasLocale found only listed kde1 code.
|
||||
# We don't need to parse -ki18nd since that'll extract messages from other domains.
|
||||
find "${packageRoot}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.js' | sort > "${DIR}/infiles.list"
|
||||
xgettext \
|
||||
${potArgs} \
|
||||
--files-from="${DIR}/infiles.list" \
|
||||
-C -kde \
|
||||
-ci18n \
|
||||
-ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 \
|
||||
-kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
|
||||
-kxi18n:1 -kxi18nc:1c,2 -kxi18np:1,2 -kxi18ncp:1c,2,3 \
|
||||
-kkxi18n:1 -kkxi18nc:1c,2 -kkxi18np:1,2 -kkxi18ncp:1c,2,3 \
|
||||
-kI18N_NOOP:1 -kI18NC_NOOP:1c,2 \
|
||||
-kI18N_NOOP2:1c,2 -kI18N_NOOP2_NOSTRIP:1c,2 \
|
||||
-ktr2i18n:1 -ktr2xi18n:1 \
|
||||
-kN_:1 \
|
||||
-kaliasLocale \
|
||||
--package-name="${widgetName}" \
|
||||
--msgid-bugs-address="${bugAddress}" \
|
||||
-D "${packageRoot}" \
|
||||
-D "${DIR}" \
|
||||
-o "template.pot.new" \
|
||||
|| \
|
||||
{ echo "[merge] error while calling xgettext. aborting."; exit 1; }
|
||||
|
||||
sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/' "template.pot.new"
|
||||
sed -i 's/# SOME DESCRIPTIVE TITLE./'"# Translation of ${widgetName} in LANGUAGE"'/' "template.pot.new"
|
||||
sed -i 's/# Copyright (C) YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/'"# Copyright (C) $(date +%Y)"'/' "template.pot.new"
|
||||
|
||||
if [ -f "template.pot" ]; then
|
||||
newPotDate=`grep "POT-Creation-Date:" template.pot.new | sed 's/.\{3\}$//'`
|
||||
oldPotDate=`grep "POT-Creation-Date:" template.pot | sed 's/.\{3\}$//'`
|
||||
sed -i 's/'"${newPotDate}"'/'"${oldPotDate}"'/' "template.pot.new"
|
||||
changes=`diff "template.pot" "template.pot.new"`
|
||||
if [ ! -z "$changes" ]; then
|
||||
# There's been changes
|
||||
sed -i 's/'"${oldPotDate}"'/'"${newPotDate}"'/' "template.pot.new"
|
||||
mv "template.pot.new" "template.pot"
|
||||
|
||||
addedKeys=`echo "$changes" | grep "> msgid" | cut -c 9- | sort`
|
||||
removedKeys=`echo "$changes" | grep "< msgid" | cut -c 9- | sort`
|
||||
echo ""
|
||||
echo "Added Keys:"
|
||||
echo "$addedKeys"
|
||||
echo ""
|
||||
echo "Removed Keys:"
|
||||
echo "$removedKeys"
|
||||
echo ""
|
||||
|
||||
else
|
||||
# No changes
|
||||
rm "template.pot.new"
|
||||
fi
|
||||
else
|
||||
# template.pot didn't already exist
|
||||
mv "template.pot.new" "template.pot"
|
||||
fi
|
||||
|
||||
potMessageCount=`expr $(grep -Pzo 'msgstr ""\n(\n|$)' "template.pot" | grep -c 'msgstr ""')`
|
||||
echo "| Locale | Lines | % Done|" > "./Status.md"
|
||||
echo "|----------|---------|-------|" >> "./Status.md"
|
||||
entryFormat="| %-8s | %7s | %5s |"
|
||||
templateLine=`perl -e "printf(\"$entryFormat\", \"Template\", \"${potMessageCount}\", \"\")"`
|
||||
echo "$templateLine" >> "./Status.md"
|
||||
|
||||
rm "${DIR}/infiles.list"
|
||||
echo "[merge] Done extracting messages"
|
||||
|
||||
#---
|
||||
echo "[merge] Merging messages"
|
||||
catalogs=`find . -name '*.po' | sort`
|
||||
for cat in $catalogs; do
|
||||
echo "[merge] $cat"
|
||||
catLocale=`basename ${cat%.*}`
|
||||
|
||||
widthArg=""
|
||||
catUsesGenerator=`grep "X-Generator:" "$cat"`
|
||||
if [ -z "$catUsesGenerator" ]; then
|
||||
widthArg="--width=400"
|
||||
fi
|
||||
|
||||
compendiumArg=""
|
||||
if [ ! -z "$COMPENDIUM_DIR" ]; then
|
||||
langCode=`basename "${cat%.*}"`
|
||||
compendiumPath=`realpath "$COMPENDIUM_DIR/compendium-${langCode}.po"`
|
||||
if [ -f "$compendiumPath" ]; then
|
||||
echo "compendiumPath=$compendiumPath"
|
||||
compendiumArg="--compendium=$compendiumPath"
|
||||
fi
|
||||
fi
|
||||
|
||||
cp "$cat" "$cat.new"
|
||||
sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/' "$cat.new"
|
||||
|
||||
msgmerge \
|
||||
${widthArg} \
|
||||
--add-location=file \
|
||||
--no-fuzzy-matching \
|
||||
${compendiumArg} \
|
||||
-o "$cat.new" \
|
||||
"$cat.new" "${DIR}/template.pot"
|
||||
|
||||
sed -i 's/# SOME DESCRIPTIVE TITLE./'"# Translation of ${widgetName} in ${catLocale}"'/' "$cat.new"
|
||||
sed -i 's/# Translation of '"${widgetName}"' in LANGUAGE/'"# Translation of ${widgetName} in ${catLocale}"'/' "$cat.new"
|
||||
sed -i 's/# Copyright (C) YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/'"# Copyright (C) $(date +%Y)"'/' "$cat.new"
|
||||
|
||||
poEmptyMessageCount=`expr $(grep -Pzo 'msgstr ""\n(\n|$)' "$cat.new" | grep -c 'msgstr ""')`
|
||||
poMessagesDoneCount=`expr $potMessageCount - $poEmptyMessageCount`
|
||||
poCompletion=`perl -e "printf(\"%d\", $poMessagesDoneCount * 100 / $potMessageCount)"`
|
||||
poLine=`perl -e "printf(\"$entryFormat\", \"$catLocale\", \"${poMessagesDoneCount}/${potMessageCount}\", \"${poCompletion}%\")"`
|
||||
echo "$poLine" >> "./Status.md"
|
||||
|
||||
# mv "$cat" "$cat.old"
|
||||
mv "$cat.new" "$cat"
|
||||
done
|
||||
echo "[merge] Done merging messages"
|
||||
|
||||
#---
|
||||
# Populate ReadMe.md
|
||||
echo "[merge] Updating translate/ReadMe.md"
|
||||
sed -i -E 's`share\/plasma\/plasmoids\/(.+)\/translate`share/plasma/plasmoids/'"${plasmoidName}"'/translate`' ./ReadMe.md
|
||||
if [[ "$website" == *"github.com"* ]]; then
|
||||
sed -i -E 's`\[new issue\]\(https:\/\/github\.com\/(.+)\/(.+)\/issues\/new\)`[new issue]('"${website}"'/issues/new)`' ./ReadMe.md
|
||||
fi
|
||||
sed -i '/^|/ d' ./ReadMe.md # Remove status table from ReadMe
|
||||
cat ./Status.md >> ./ReadMe.md
|
||||
rm ./Status.md
|
||||
|
||||
echo "[merge] Done"
|
|
@ -0,0 +1,181 @@
|
|||
#!/bin/bash
|
||||
# Version 9
|
||||
# Requires plasmoidviewer v5.13.0
|
||||
|
||||
function checkIfLangInstalled {
|
||||
if [ -x "$(command -v dpkg)" ]; then
|
||||
dpkg -l ${1} >/dev/null 2>&1 || ( \
|
||||
echo -e "${1} not installed.\nInstalling now before continuing.\n" \
|
||||
; sudo apt install ${1} \
|
||||
) || ( \
|
||||
echo -e "\nError trying to install ${1}\nPlease run 'sudo apt install ${1}'\n" \
|
||||
; exit 1 \
|
||||
)
|
||||
elif [ -x "$(command -v pacman)" ]; then
|
||||
# TODO: run `locale -a` and check if the locale is enabled.
|
||||
if false; then
|
||||
# https://wiki.archlinux.org/index.php/Locale
|
||||
# Uncomment the locale in /etc/locale.gen
|
||||
# Then run `locale-gen`
|
||||
echo -e "\nPlease install this locale in System Settings first.\n"
|
||||
exit 1
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo -e "\nPackage manager not recognized. If the widget is not translated, please install the package '${1}'\n"
|
||||
fi
|
||||
}
|
||||
|
||||
langInput="${1}"
|
||||
lang=""
|
||||
languagePack=""
|
||||
|
||||
if [[ "$langInput" =~ ":" ]]; then # String contains a colon so assume it's a locale code.
|
||||
lang="${langInput}"
|
||||
IFS=: read -r l1 l2 <<< "${lang}"
|
||||
languagePack="language-pack-${l2}"
|
||||
fi
|
||||
|
||||
# https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes/28357857#28357857
|
||||
declare -a langArr=(
|
||||
"af_ZA:af:Afrikaans (South Africa)"
|
||||
"ak_GH:ak:Akan (Ghana)"
|
||||
"am_ET:am:Amharic (Ethiopia)"
|
||||
"ar_EG:ar:Arabic (Egypt)"
|
||||
"as_IN:as:Assamese (India)"
|
||||
"az_AZ:az:Azerbaijani (Azerbaijan)"
|
||||
"be_BY:be:Belarusian (Belarus)"
|
||||
"bem_ZM:bem:Bemba (Zambia)"
|
||||
"bg_BG:bg:Bulgarian (Bulgaria)"
|
||||
"bo_IN:bo:Tibetan (India)"
|
||||
"bs_BA:bs:Bosnian (Bosnia and Herzegovina)"
|
||||
"ca_ES:ca:Catalan (Spain)"
|
||||
"chr_US:ch:Cherokee (United States)"
|
||||
"cs_CZ:cs:Czech (Czech Republic)"
|
||||
"cy_GB:cy:Welsh (United Kingdom)"
|
||||
"da_DK:da:Danish (Denmark)"
|
||||
"de_DE:de:German (Germany)"
|
||||
"el_GR:el:Greek (Greece)"
|
||||
"es_MX:es:Spanish (Mexico)"
|
||||
"et_EE:et:Estonian (Estonia)"
|
||||
"eu_ES:eu:Basque (Spain)"
|
||||
"fa_IR:fa:Persian (Iran)"
|
||||
"ff_SN:ff:Fulah (Senegal)"
|
||||
"fi_FI:fi:Finnish (Finland)"
|
||||
"fo_FO:fo:Faroese (Faroe Islands)"
|
||||
"fr_CA:fr:French (Canada)"
|
||||
"ga_IE:ga:Irish (Ireland)"
|
||||
"gl_ES:gl:Galician (Spain)"
|
||||
"gu_IN:gu:Gujarati (India)"
|
||||
"gv_GB:gv:Manx (United Kingdom)"
|
||||
"ha_NG:ha:Hausa (Nigeria)"
|
||||
"he_IL:he:Hebrew (Israel)"
|
||||
"hi_IN:hi:Hindi (India)"
|
||||
"hr_HR:hr:Croatian (Croatia)"
|
||||
"hu_HU:hu:Hungarian (Hungary)"
|
||||
"hy_AM:hy:Armenian (Armenia)"
|
||||
"id_ID:id:Indonesian (Indonesia)"
|
||||
"ig_NG:ig:Igbo (Nigeria)"
|
||||
"is_IS:is:Icelandic (Iceland)"
|
||||
"it_IT:it:Italian (Italy)"
|
||||
"ja_JP:ja:Japanese (Japan)"
|
||||
"ka_GE:ka:Georgian (Georgia)"
|
||||
"kk_KZ:kk:Kazakh (Kazakhstan)"
|
||||
"kl_GL:kl:Kalaallisut (Greenland)"
|
||||
"km_KH:km:Khmer (Cambodia)"
|
||||
"kn_IN:kn:Kannada (India)"
|
||||
"ko_KR:ko:Korean (South Korea)"
|
||||
"ko_KR:ko:Korean (South Korea)"
|
||||
"lg_UG:lg:Ganda (Uganda)"
|
||||
"lt_LT:lt:Lithuanian (Lithuania)"
|
||||
"lv_LV:lv:Latvian (Latvia)"
|
||||
"mg_MG:mg:Malagasy (Madagascar)"
|
||||
"mk_MK:mk:Macedonian (Macedonia)"
|
||||
"ml_IN:ml:Malayalam (India)"
|
||||
"mr_IN:mr:Marathi (India)"
|
||||
"ms_MY:ms:Malay (Malaysia)"
|
||||
"mt_MT:mt:Maltese (Malta)"
|
||||
"my_MM:my:Burmese (Myanmar [Burma])"
|
||||
"nb_NO:nb:Norwegian Bokmål (Norway)"
|
||||
"ne_NP:ne:Nepali (Nepal)"
|
||||
"nl_NL:nl:Dutch (Netherlands)"
|
||||
"nn_NO:nn:Norwegian Nynorsk (Norway)"
|
||||
"om_ET:om:Oromo (Ethiopia)"
|
||||
"or_IN:or:Oriya (India)"
|
||||
"pa_PK:pa:Punjabi (Pakistan)"
|
||||
"pl_PL:pl:Polish (Poland)"
|
||||
"ps_AF:ps:Pashto (Afghanistan)"
|
||||
"pt_BR:pt:Portuguese (Brazil)"
|
||||
"ro_RO:ro:Romanian (Romania)"
|
||||
"ru_RU:ru:Russian (Russia)"
|
||||
"rw_RW:rw:Kinyarwanda (Rwanda)"
|
||||
"si_LK:si:Sinhala (Sri Lanka)"
|
||||
"sk_SK:sk:Slovak (Slovakia)"
|
||||
"sl_SI:sl:Slovenian (Slovenia)"
|
||||
"so_SO:so:Somali (Somalia)"
|
||||
"sq_AL:sq:Albanian (Albania)"
|
||||
"sr_RS:sr:Serbian (Serbia)"
|
||||
"sv_SE:sv:Swedish (Sweden)"
|
||||
"sw_KE:sw:Swahili (Kenya)"
|
||||
"ta_IN:ta:Tamil (India)"
|
||||
"te_IN:te:Telugu (India)"
|
||||
"th_TH:th:Thai (Thailand)"
|
||||
"ti_ER:ti:Tigrinya (Eritrea)"
|
||||
"to_TO:to:Tonga (Tonga)"
|
||||
"tr_TR:tr:Turkish (Turkey)"
|
||||
"uk_UA:uk:Ukrainian (Ukraine)"
|
||||
"ur_IN:ur:Urdu (India)"
|
||||
"uz_UZ:uz:Uzbek (Uzbekistan)"
|
||||
"vi_VN:vi:Vietnamese (Vietnam)"
|
||||
"yo_NG:yo:Yoruba (Nigeria)"
|
||||
"yo_NG:yo:Yoruba (Nigeria)"
|
||||
"yue_HK:yu:Cantonese (Hong Kong)"
|
||||
"zh_CN:zh:Chinese (China)"
|
||||
"zu_ZA:zu:Zulu (South Africa)"
|
||||
)
|
||||
|
||||
for i in "${langArr[@]}"; do
|
||||
IFS=: read -r l1 l2 l3 <<< "$i"
|
||||
if [ "$langInput" == "$l2" ]; then
|
||||
lang="${l1}:${l2}"
|
||||
languagePack="language-pack-${l2}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$lang" ]; then
|
||||
echo "plasmoidlocaletest doesn't recognize the language '$lang'"
|
||||
echo "Eg:"
|
||||
scriptcmd='sh ./plasmoidlocaletest'
|
||||
for i in "${langArr[@]}"; do
|
||||
IFS=: read -r l1 l2 l3 <<< "$i"
|
||||
echo " ${scriptcmd} ${l2} | ${l3}"
|
||||
done
|
||||
echo ""
|
||||
echo "Or use a the full locale code:"
|
||||
echo " ${scriptcmd} ar_EG:ar"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IFS=: read -r l1 l2 <<< "${lang}"
|
||||
l1="${l1}.UTF-8"
|
||||
|
||||
# Check if language is installed
|
||||
if [ ! -z "$languagePack" ]; then
|
||||
if [ "$lang" == "zh_CN:zh" ]; then languagePack="language-pack-zh-hans"
|
||||
fi
|
||||
|
||||
checkIfLangInstalled "$languagePack" || exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "LANGUAGE=\"${lang}\""
|
||||
echo "LANG=\"${l1}\""
|
||||
|
||||
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
packageDir="${scriptDir}/.."
|
||||
|
||||
# Build local translations for plasmoidviewer
|
||||
sh "${scriptDir}/build"
|
||||
|
||||
LANGUAGE="${lang}" LANG="${l1}" LC_TIME="${l1}" QML_DISABLE_DISK_CACHE=true plasmoidviewer -a "$packageDir" -l topedge -f horizontal -x 0 -y 0
|
|
@ -0,0 +1,60 @@
|
|||
# Translation of apdatifier in ru_RU
|
||||
# Copyright (C) 2024
|
||||
# This file is distributed under the same license as the apdatifier package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: apdatifier\n"
|
||||
"Report-Msgid-Bugs-To: https://melawy.ru\n"
|
||||
"POT-Creation-Date: 2024-01-03 17:54+0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../contents/config/config.qml
|
||||
msgctxt "@title"
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Update interval (minutes):"
|
||||
msgstr "Интервал проверки (минуты)"
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Notifications:"
|
||||
msgstr "Уведомления"
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@option:check"
|
||||
msgid "Show notification"
|
||||
msgstr "Показывать уведомления"
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Command for cheching updates:"
|
||||
msgstr "Команда для проверки обновлений"
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Command for upgrade:"
|
||||
msgstr "Команда для обновления"
|
||||
|
||||
#: ../contents/ui/Full.qml
|
||||
msgid "Check updates"
|
||||
msgstr "Проверить обновления"
|
||||
|
||||
#: ../contents/ui/Full.qml
|
||||
msgid "Install updates"
|
||||
msgstr "Установить обновления"
|
||||
|
||||
#: ../contents/ui/main.qml
|
||||
msgid "Some text"
|
||||
msgstr "Какой-то текст"
|
|
@ -0,0 +1,60 @@
|
|||
# Translation of ArchUpdate in LANGUAGE
|
||||
# Copyright (C) 2024
|
||||
# This file is distributed under the same license as the ArchUpdate package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ArchUpdate\n"
|
||||
"Report-Msgid-Bugs-To: https://melawy.ru\n"
|
||||
"POT-Creation-Date: 2024-01-03 17:54+0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../contents/config/config.qml
|
||||
msgctxt "@title"
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Update interval (minutes):"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Notifications:"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@option:check"
|
||||
msgid "Show notification"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Command for cheching updates:"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/config/configGeneral.qml
|
||||
msgctxt "@title:label"
|
||||
msgid "Command for upgrade:"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/Full.qml
|
||||
msgid "Check updates"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/Full.qml
|
||||
msgid "Install updates"
|
||||
msgstr ""
|
||||
|
||||
#: ../contents/ui/main.qml
|
||||
msgid "Some text"
|
||||
msgstr ""
|
Loading…
Reference in New Issue