Merge pull request #5423 from mozilla/revert-dbg-refactor
Revert "Refactor debug locales to match addons-frontend, prepares for rtl support (#5402)"
This commit is contained in:
Коммит
0de496c298
|
@ -20,7 +20,7 @@ for pofile in `find $1 -type f -name "django.po"`; do
|
|||
dir=`dirname $pofile`
|
||||
lang=`echo $pofile | cut -d "/" -f2`
|
||||
stem=`basename $pofile .po`
|
||||
if [ $lang != 'dbr' ] && [ $lang != 'dbl' ]
|
||||
if [ $lang != 'dbg' ]
|
||||
then
|
||||
# lint the .po file
|
||||
dennis-cmd lint --quiet --errorsonly "$pofile"
|
||||
|
@ -41,7 +41,7 @@ for pofile in `find $1 -type f -name "djangojs.po"`; do
|
|||
lang=`echo $pofile | cut -d "/" -f2`
|
||||
stem=`basename $pofile .po`
|
||||
touch "${dir}/${stem}.mo"
|
||||
if [ $lang != 'dbr' ] && [ $lang != 'dbl' ]
|
||||
if [ $lang != 'dbg' ]
|
||||
then
|
||||
# lint the .po file
|
||||
dennis-cmd lint --quiet --errorsonly "$pofile"
|
||||
|
|
Двоичный файл не отображается.
|
@ -3,7 +3,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PROJECT 1.0\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2017-05-15 02:55+0000\n"
|
||||
"POT-Creation-Date: 2017-05-02 11:20+0000\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"
|
||||
|
@ -192,6 +192,14 @@ msgstr "Ḿẏ ȧḓḓ-ǿƞ ḓǿḗşƞ'ŧ ƒīŧ īƞŧǿ ȧƞẏ ǿƒ ŧħ
|
|||
msgid "No compatible versions"
|
||||
msgstr "Ƞǿ ƈǿḿƥȧŧīƀŀḗ ṽḗřşīǿƞş"
|
||||
|
||||
#: src/olympia/addons/templates/addons/button.html src/olympia/addons/templates/addons/impala/button.html
|
||||
msgid "Added to Mobile"
|
||||
msgstr "Ȧḓḓḗḓ ŧǿ Ḿǿƀīŀḗ"
|
||||
|
||||
#: src/olympia/addons/templates/addons/button.html src/olympia/addons/templates/addons/impala/button.html
|
||||
msgid "Add to Mobile"
|
||||
msgstr "Ȧḓḓ ŧǿ Ḿǿƀīŀḗ"
|
||||
|
||||
#. {0} is a platform name like Windows or Mac OS X.
|
||||
#: src/olympia/addons/templates/addons/button.html src/olympia/addons/templates/addons/includes/install_button.html
|
||||
msgid "for {0}"
|
||||
|
@ -692,10 +700,6 @@ msgstr "ɊŘ ƈǿḓḗ ƒǿř ȧḓḓ-ǿƞ"
|
|||
msgid "Want {0} on your mobile Firefox? Scan this QR code to install directly to your phone. (You'll need a QR reader. Search your phone's marketplace if don't have one.)"
|
||||
msgstr "Ẇȧƞŧ {0} ǿƞ ẏǿŭř ḿǿƀīŀḗ Ƒīřḗƒǿẋ? Şƈȧƞ ŧħīş ɊŘ ƈǿḓḗ ŧǿ īƞşŧȧŀŀ ḓīřḗƈŧŀẏ ŧǿ ẏǿŭř ƥħǿƞḗ. (Ẏǿŭ'ŀŀ ƞḗḗḓ ȧ ɊŘ řḗȧḓḗř. Şḗȧřƈħ ẏǿŭř ƥħǿƞḗ'ş ḿȧřķḗŧƥŀȧƈḗ īƒ ḓǿƞ'ŧ ħȧṽḗ ǿƞḗ.)"
|
||||
|
||||
#: src/olympia/addons/templates/addons/replacement_addons.html
|
||||
msgid "Replacement Add-ons for {0}"
|
||||
msgstr "Řḗƥŀȧƈḗḿḗƞŧ Ȧḓḓ-ǿƞş ƒǿř {0}"
|
||||
|
||||
#: src/olympia/addons/templates/addons/impala/details-more.html src/olympia/addons/templates/addons/impala/details.html src/olympia/addons/templates/addons/report_abuse.html
|
||||
msgid "Report Abuse"
|
||||
msgstr "Řḗƥǿřŧ Ȧƀŭşḗ"
|
||||
|
@ -1091,6 +1095,10 @@ msgstr "Ḿẏ Ȧḓḓ-ǿƞş"
|
|||
msgid "My Themes"
|
||||
msgstr "Ḿẏ Ŧħḗḿḗş"
|
||||
|
||||
#: src/olympia/addons/templates/addons/includes/install_button.html
|
||||
msgid "Add to Firefox"
|
||||
msgstr "Ȧḓḓ ŧǿ Ƒīřḗƒǿẋ"
|
||||
|
||||
#. This is a caption for a table. {0} is an add-on name.
|
||||
#: src/olympia/addons/templates/addons/includes/persona.html src/olympia/editors/templates/editors/addon_details_box.html
|
||||
msgid "Add-on Information for {0}"
|
||||
|
@ -4179,8 +4187,7 @@ msgstr[1] "<b>{0}</b> ŧħḗḿḗş"
|
|||
msgid "Edit Information"
|
||||
msgstr "Ḗḓīŧ Īƞƒǿřḿȧŧīǿƞ"
|
||||
|
||||
#: src/olympia/devhub/templates/devhub/addons/edit.html src/olympia/devhub/templates/devhub/includes/macros.html src/olympia/editors/templates/editors/includes/files_view.html
|
||||
#: src/olympia/translations/templates/translations/all-locales.html
|
||||
#: src/olympia/devhub/templates/devhub/addons/edit.html src/olympia/devhub/templates/devhub/includes/macros.html src/olympia/translations/templates/translations/all-locales.html
|
||||
msgid "None"
|
||||
msgstr "Ƞǿƞḗ"
|
||||
|
||||
|
@ -6369,18 +6376,6 @@ msgstr "Ħȧş ŧǿǿ ḿȧƞẏ ḓȧīŀẏ ŭşḗřş."
|
|||
msgid "Has too few consecutive human-approved updates."
|
||||
msgstr "Ħȧş ŧǿǿ ƒḗẇ ƈǿƞşḗƈŭŧīṽḗ ħŭḿȧƞ-ȧƥƥřǿṽḗḓ ŭƥḓȧŧḗş."
|
||||
|
||||
#: src/olympia/editors/models.py
|
||||
msgid "Has a pending info request."
|
||||
msgstr "Ħȧş ȧ ƥḗƞḓīƞɠ īƞƒǿ řḗɋŭḗşŧ."
|
||||
|
||||
#: src/olympia/editors/models.py
|
||||
msgid "Is flagged for admin review."
|
||||
msgstr "Īş ƒŀȧɠɠḗḓ ƒǿř ȧḓḿīƞ řḗṽīḗẇ."
|
||||
|
||||
#: src/olympia/editors/models.py
|
||||
msgid "Is locked by a reviewer."
|
||||
msgstr "Īş ŀǿƈķḗḓ ƀẏ ȧ řḗṽīḗẇḗř."
|
||||
|
||||
#: src/olympia/editors/tasks.py
|
||||
msgid "Duplicate Submission"
|
||||
msgstr "Ḓŭƥŀīƈȧŧḗ Şŭƀḿīşşīǿƞ"
|
||||
|
@ -6473,8 +6468,18 @@ msgid "{addon} :: Abuse Reports"
|
|||
msgstr "{ȧḓḓǿƞ} :: Ȧƀŭşḗ Řḗƥǿřŧş"
|
||||
|
||||
#: src/olympia/editors/templates/editors/abuse_reports.html
|
||||
msgid "Abuse Reports for {addon} and its developers ({num})"
|
||||
msgstr "Ȧƀŭşḗ Řḗƥǿřŧş ƒǿř {ȧḓḓǿƞ} ȧƞḓ īŧş ḓḗṽḗŀǿƥḗřş ({ƞŭḿ})"
|
||||
msgid "Abuse Reports for {addon} ({num})"
|
||||
msgstr "Ȧƀŭşḗ Řḗƥǿřŧş ƒǿř {ȧḓḓǿƞ} ({ƞŭḿ})"
|
||||
|
||||
#: src/olympia/editors/templates/editors/abuse_reports.html
|
||||
#, python-format
|
||||
msgid "%(user)s on %(date)s [%(ip_address)s]"
|
||||
msgstr "%(user)s ǿƞ %(date)s [%(ip_address)s]"
|
||||
|
||||
#: src/olympia/editors/templates/editors/abuse_reports.html
|
||||
#, python-format
|
||||
msgid "<i>anonymous</i> on %(date)s [%(ip_address)s]"
|
||||
msgstr "<i>ȧƞǿƞẏḿǿŭş</i> ǿƞ %(date)s [%(ip_address)s]"
|
||||
|
||||
#. This refers to this version's compatible applications, such as Firefox 8.0
|
||||
#: src/olympia/editors/templates/editors/addon_details_box.html src/olympia/search/templates/search/results.html src/olympia/versions/templates/versions/version.html
|
||||
|
@ -6513,14 +6518,6 @@ msgstr "Ŀȧşŧ Ȧƥƥřǿṽȧŀ Ḓȧŧḗ"
|
|||
msgid "Approvals Since Last Automatic Review"
|
||||
msgstr "Ȧƥƥřǿṽȧŀş Şīƞƈḗ Ŀȧşŧ Ȧŭŧǿḿȧŧīƈ Řḗṽīḗẇ"
|
||||
|
||||
#: src/olympia/editors/templates/editors/addon_details_box.html
|
||||
msgid "Abuse Reports ({num})"
|
||||
msgstr "Ȧƀŭşḗ Řḗƥǿřŧş ({ƞŭḿ})"
|
||||
|
||||
#: src/olympia/editors/templates/editors/addon_details_box.html
|
||||
msgid "Bad User Reviews ({num})"
|
||||
msgstr "Ɓȧḓ Ŭşḗř Řḗṽīḗẇş ({ƞŭḿ})"
|
||||
|
||||
#: src/olympia/editors/templates/editors/addon_details_box.html
|
||||
msgid "More about this add-on"
|
||||
msgstr "Ḿǿřḗ ȧƀǿŭŧ ŧħīş ȧḓḓ-ǿƞ"
|
||||
|
@ -6864,12 +6861,12 @@ msgid "The developer has provided source code."
|
|||
msgstr "Ŧħḗ ḓḗṽḗŀǿƥḗř ħȧş ƥřǿṽīḓḗḓ şǿŭřƈḗ ƈǿḓḗ."
|
||||
|
||||
#: src/olympia/editors/templates/editors/review.html
|
||||
msgid "Not Auto Approved Because"
|
||||
msgstr "Ƞǿŧ Ȧŭŧǿ Ȧƥƥřǿṽḗḓ Ɓḗƈȧŭşḗ"
|
||||
msgid "Auto Approval Summary"
|
||||
msgstr "Ȧŭŧǿ Ȧƥƥřǿṽȧŀ Şŭḿḿȧřẏ"
|
||||
|
||||
#: src/olympia/editors/templates/editors/review.html
|
||||
msgid "Auto-Approval script has not run yet on this version."
|
||||
msgstr "Ȧŭŧǿ-Ȧƥƥřǿṽȧŀ şƈřīƥŧ ħȧş ƞǿŧ řŭƞ ẏḗŧ ǿƞ ŧħīş ṽḗřşīǿƞ."
|
||||
msgid "No attempt recorded yet."
|
||||
msgstr "Ƞǿ ȧŧŧḗḿƥŧ řḗƈǿřḓḗḓ ẏḗŧ."
|
||||
|
||||
#: src/olympia/editors/templates/editors/review.html
|
||||
msgid "This version has not been reviewed."
|
||||
|
@ -6945,11 +6942,6 @@ msgstr "Ħīḓḗ Ƈǿḿḿḗƞŧş"
|
|||
msgid "No reviews found for this period."
|
||||
msgstr "Ƞǿ řḗṽīḗẇş ƒǿŭƞḓ ƒǿř ŧħīş ƥḗřīǿḓ."
|
||||
|
||||
#: src/olympia/editors/templates/editors/includes/abuse_reports_list.html
|
||||
#, python-format
|
||||
msgid "%(user)s [%(ip_address)s] reported %(object)s on %(date)s"
|
||||
msgstr "%(user)s [%(ip_address)s] řḗƥǿřŧḗḓ %(object)s ǿƞ %(date)s"
|
||||
|
||||
#: src/olympia/editors/templates/editors/includes/daily-message.html
|
||||
msgid "Dismiss this announcement"
|
||||
msgstr "Ḓīşḿīşş ŧħīş ȧƞƞǿŭƞƈḗḿḗƞŧ"
|
||||
|
@ -6966,10 +6958,6 @@ msgstr "Ƈǿƞŧḗƞŧş"
|
|||
msgid "Compare"
|
||||
msgstr "Ƈǿḿƥȧřḗ"
|
||||
|
||||
#: src/olympia/editors/templates/editors/includes/files_view.html
|
||||
msgid "Permissions:"
|
||||
msgstr "Ƥḗřḿīşşīǿƞş:"
|
||||
|
||||
#: src/olympia/editors/templates/editors/includes/history.html
|
||||
#, python-format
|
||||
msgid "<div>By %(user)s on %(date)s</div>"
|
||||
|
@ -7008,11 +6996,6 @@ msgstr "Ȧŀŀ Ŧīḿḗ"
|
|||
msgid "You have <span>{0}</span> points."
|
||||
msgstr "Ẏǿŭ ħȧṽḗ <span>{0}</span> ƥǿīƞŧş."
|
||||
|
||||
#: src/olympia/editors/templates/editors/includes/user_reviews_list.html
|
||||
#, python-format
|
||||
msgid "%(user)s on %(date)s [%(ip_address)s]"
|
||||
msgstr "%(user)s ǿƞ %(date)s [%(ip_address)s]"
|
||||
|
||||
#: src/olympia/editors/templates/editors/themes/deleted.html
|
||||
msgid "Date Deleted"
|
||||
msgstr "Ḓȧŧḗ Ḓḗŀḗŧḗḓ"
|
||||
|
@ -9459,7 +9442,7 @@ msgstr "Ẇħȧŧ īş ŧħḗ Ḿẏ Ƒȧṽǿřīŧḗş ƈǿŀŀḗƈŧīǿƞ
|
|||
msgid "Favorite add-ons are add-ons that you have bookmarked to easily get back to later. You can add an add-on to your favorites collection by clicking \"Add to favorites\" on its details page."
|
||||
msgstr "Ƒȧṽǿřīŧḗ ȧḓḓ-ǿƞş ȧřḗ ȧḓḓ-ǿƞş ŧħȧŧ ẏǿŭ ħȧṽḗ ƀǿǿķḿȧřķḗḓ ŧǿ ḗȧşīŀẏ ɠḗŧ ƀȧƈķ ŧǿ ŀȧŧḗř. Ẏǿŭ ƈȧƞ ȧḓḓ ȧƞ ȧḓḓ-ǿƞ ŧǿ ẏǿŭř ƒȧṽǿřīŧḗş ƈǿŀŀḗƈŧīǿƞ ƀẏ ƈŀīƈķīƞɠ \"Ȧḓḓ ŧǿ ƒȧṽǿřīŧḗş\" ǿƞ īŧş ḓḗŧȧīŀş ƥȧɠḗ."
|
||||
|
||||
#: src/olympia/pages/templates/pages/faq.html
|
||||
#: src/olympia/pages/templates/pages/faq.html src/olympia/templates/impala/header_title.html
|
||||
msgid "Mobile Add-ons"
|
||||
msgstr "Ḿǿƀīŀḗ Ȧḓḓ-ǿƞş"
|
||||
|
||||
|
@ -10575,6 +10558,10 @@ msgstr "<img alt=\"Firefox\" src=\"{0}\"> Ȧḓḓ-ǿƞş"
|
|||
msgid "<img alt=\"Thunderbird\" src=\"{0}\"> Add-ons"
|
||||
msgstr "<img alt=\"Thunderbird\" src=\"{0}\"> Ȧḓḓ-ǿƞş"
|
||||
|
||||
#: src/olympia/templates/header_title.html
|
||||
msgid "<img alt=\"Firefox\" src=\"{0}\"> Mobile Add-ons"
|
||||
msgstr "<img alt=\"Firefox\" src=\"{0}\"> Ḿǿƀīŀḗ Ȧḓḓ-ǿƞş"
|
||||
|
||||
#: src/olympia/templates/header_title.html
|
||||
msgid "<img alt=\"SeaMonkey\" src=\"{0}\"> Add-ons"
|
||||
msgstr "<img alt=\"SeaMonkey\" src=\"{0}\"> Ȧḓḓ-ǿƞş"
|
||||
|
@ -10696,6 +10683,10 @@ msgstr "Ƒīřḗƒǿẋ Ȧƈƈǿŭƞŧş ŭşḗřş ƈȧƞƞǿŧ ƈŭřřḗƞ
|
|||
msgid "Profile Photo"
|
||||
msgstr "Ƥřǿƒīŀḗ Ƥħǿŧǿ"
|
||||
|
||||
#: src/olympia/users/forms.py src/olympia/users/templates/users/edit.html
|
||||
msgid "Default locale"
|
||||
msgstr "Ḓḗƒȧŭŀŧ ŀǿƈȧŀḗ"
|
||||
|
||||
#: src/olympia/users/forms.py
|
||||
msgid "This URL has an invalid format. Valid URLs look like http://example.com/my_page."
|
||||
msgstr "Ŧħīş ŬŘĿ ħȧş ȧƞ īƞṽȧŀīḓ ƒǿřḿȧŧ. Ṽȧŀīḓ ŬŘĿş ŀǿǿķ ŀīķḗ http://example.com/my_page."
|
||||
|
@ -10921,6 +10912,10 @@ msgstr "Ƈħǿǿşḗ Ƥħǿŧǿ…"
|
|||
msgid "Delete current photo"
|
||||
msgstr "Ḓḗŀḗŧḗ ƈŭřřḗƞŧ ƥħǿŧǿ"
|
||||
|
||||
#: src/olympia/users/templates/users/edit.html
|
||||
msgid "This is the default locale used to display information about you (like your description)."
|
||||
msgstr "Ŧħīş īş ŧħḗ ḓḗƒȧŭŀŧ ŀǿƈȧŀḗ ŭşḗḓ ŧǿ ḓīşƥŀȧẏ īƞƒǿřḿȧŧīǿƞ ȧƀǿŭŧ ẏǿŭ (ŀīķḗ ẏǿŭř ḓḗşƈřīƥŧīǿƞ)."
|
||||
|
||||
#: src/olympia/users/templates/users/edit.html
|
||||
msgid "Introduce yourself to the community, if you like! This text will appear publicly on your user info page."
|
||||
msgstr "Īƞŧřǿḓŭƈḗ ẏǿŭřşḗŀƒ ŧǿ ŧħḗ ƈǿḿḿŭƞīŧẏ, īƒ ẏǿŭ ŀīķḗ! Ŧħīş ŧḗẋŧ ẇīŀŀ ȧƥƥḗȧř ƥŭƀŀīƈŀẏ ǿƞ ẏǿŭř ŭşḗř īƞƒǿ ƥȧɠḗ."
|
Двоичный файл не отображается.
|
@ -3,7 +3,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PROJECT 1.0\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2017-05-15 02:55+0000\n"
|
||||
"POT-Creation-Date: 2017-05-02 11:20+0000\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"
|
|
@ -0,0 +1,2 @@
|
|||
This is a fake language used for debugging the site. Files generated with
|
||||
podebug. Ask clouserw for help.
|
Двоичные данные
locale/dbl/LC_MESSAGES/django.mo
Двоичные данные
locale/dbl/LC_MESSAGES/django.mo
Двоичный файл не отображается.
Двоичные данные
locale/dbl/LC_MESSAGES/djangojs.mo
Двоичные данные
locale/dbl/LC_MESSAGES/djangojs.mo
Двоичный файл не отображается.
|
@ -24,38 +24,48 @@ EMAIL_SOURCE="https://github.com/mozilla/olympia/tree/master/locale"
|
|||
CLEAN_FLAGS="--no-obsolete --width=200 --add-location=file"
|
||||
MERGE_FLAGS="--update --width=200 --backup=none"
|
||||
UNIQ_FLAGS="--width=200"
|
||||
|
||||
# We don't do `dbr` for now, see
|
||||
# https://github.com/mozilla/addons-server/pull/5402#discussion_r116455162
|
||||
# for a few more details
|
||||
DEBUG_LOCALES="dbl"
|
||||
unset DOALLTHETHINGS
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
function confirm {
|
||||
if [ ! -z $DOALLTHETHINGS ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
PROMPT=$1
|
||||
read -p "$PROMPT [y/n]: " YESNO
|
||||
if [[ $YESNO == 'y' ]]
|
||||
then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$1" == "--do-all-the-things" ]]; then
|
||||
DOALLTHETHINGS=1
|
||||
fi
|
||||
|
||||
if [ ! -d "locale" ]; then
|
||||
echo "Sorry, please run from the root of the project, eg. ./locale/omg_new_l10n.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#if [ ! -z "$(git status --porcelain)" ]; then
|
||||
# echo "Looks like you have some local changes. Please clean up your root before we start committing random things."
|
||||
# git status
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
echo "Alright, here we go..."
|
||||
|
||||
./manage.py extract
|
||||
|
||||
pushd locale > /dev/null
|
||||
|
||||
for debugLocale in $DEBUG_LOCALES; do
|
||||
for domain in django djangojs; do
|
||||
if [ "$debugLocale" == "dbr" ]; then
|
||||
rewrite="flipped"
|
||||
else
|
||||
rewrite="unicode"
|
||||
fi
|
||||
|
||||
echo "generating debug locale '$debugLocale' for '$domain' using '$rewrite'"
|
||||
|
||||
podebug -i "templates/LC_MESSAGES/$domain.pot" -o "$debugLocale/LC_MESSAGES/$domain.po" --rewrite "$rewrite"
|
||||
done
|
||||
done
|
||||
podebug --rewrite=unicode templates/LC_MESSAGES/django.pot dbg/LC_MESSAGES/django.po
|
||||
podebug --rewrite=unicode templates/LC_MESSAGES/djangojs.pot dbg/LC_MESSAGES/djangojs.po
|
||||
|
||||
echo "Merging any new keys..."
|
||||
for i in `find . -name "django.po" | grep -v "en_US"`; do
|
||||
|
@ -79,9 +89,56 @@ for i in `find . -name "djangojs.po"`; do
|
|||
msgattrib $CLEAN_FLAGS --output-file=$i $i
|
||||
done
|
||||
|
||||
msgattrib $CLEAN_FLAGS --output-file=dbg/LC_MESSAGES/django.po dbg/LC_MESSAGES/django.po
|
||||
msgattrib $CLEAN_FLAGS --output-file=dbg/LC_MESSAGES/djangojs.po dbg/LC_MESSAGES/djangojs.po
|
||||
msgfilter -i sr/LC_MESSAGES/django.po -o sr_Latn/LC_MESSAGES/django.po recode-sr-latin
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
# pushd locale > /dev/null
|
||||
# ./compile-mo.sh .
|
||||
# popd > /dev/null
|
||||
|
||||
#if confirm "Commit your changes?"; then
|
||||
# git commit locale -m "Extract/compile script. Today's lucky number is $RANDOM."
|
||||
# git push mozilla master
|
||||
#fi
|
||||
|
||||
# echo "Calculating changes...."
|
||||
# pushd locale > /dev/null
|
||||
# CHANGES=$(cat <<MAIL
|
||||
# From: $EMAIL_FROM
|
||||
# To: $EMAIL_TO
|
||||
# Subject: $EMAIL_SUBJECT
|
||||
|
||||
# Hi,
|
||||
|
||||
# I am an automated script letting you know some .po files have just been
|
||||
# updated. Unless something unusual is happening, we do weekly pushes on
|
||||
# Tuesdays so any strings committed by then will go live. To give you an idea of
|
||||
# the number of new strings I will calculate untranslated strings below.
|
||||
|
||||
# `./stats-po.sh .`
|
||||
|
||||
# Source files: $EMAIL_SOURCE
|
||||
|
||||
# If you have any questions please reply to the list.
|
||||
|
||||
# Thanks so much for all your help!
|
||||
|
||||
|
||||
# MAIL
|
||||
# )
|
||||
# popd > /dev/null
|
||||
|
||||
# echo "-----------------------------------------------"
|
||||
# echo "$CHANGES"
|
||||
# echo "-----------------------------------------------"
|
||||
|
||||
# Uses sendmail so we can set a real From address
|
||||
#if confirm "Do you want to send that to $EMAIL_TO?"; then
|
||||
# echo "$CHANGES" | /usr/lib/sendmail -t
|
||||
#fi
|
||||
|
||||
unset DOALLTHETHINGS
|
||||
echo "done."
|
||||
|
|
|
@ -146,12 +146,6 @@ INBOUND_EMAIL_VALIDATION_KEY = 'totally-unsecure-validation-string'
|
|||
GITHUB_API_USER = ''
|
||||
GITHUB_API_TOKEN = ''
|
||||
|
||||
|
||||
AMO_LANGUAGES = AMO_LANGUAGES + DEBUG_LANGUAGES
|
||||
|
||||
LANGUAGES = lazy(lazy_langs, dict)(AMO_LANGUAGES)
|
||||
LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in AMO_LANGUAGES])
|
||||
|
||||
# If you have settings you want to overload, put them in a local_settings.py.
|
||||
try:
|
||||
from local_settings import * # noqa
|
||||
|
|
|
@ -587,7 +587,7 @@ def get_locale_from_lang(lang):
|
|||
"""Pass in a language (u'en-US') get back a Locale object courtesy of
|
||||
Babel. Use this to figure out currencies, bidi, names, etc."""
|
||||
# Special fake language can just act like English for formatting and such
|
||||
if not lang or lang in ('dbg', 'dbr', 'dbl'):
|
||||
if not lang or lang == 'dbg':
|
||||
lang = 'en'
|
||||
|
||||
return Locale.parse(translation.to_locale(lang))
|
||||
|
|
|
@ -223,8 +223,7 @@ PAYPAL_CHAINS = (
|
|||
|
||||
SENTRY_DSN = env('SENTRY_DSN')
|
||||
|
||||
AMO_LANGUAGES = AMO_LANGUAGES + DEBUG_LANGUAGES
|
||||
|
||||
AMO_LANGUAGES = AMO_LANGUAGES + ('dbg',)
|
||||
LANGUAGES = lazy(lazy_langs, dict)(AMO_LANGUAGES)
|
||||
LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in AMO_LANGUAGES])
|
||||
|
||||
|
|
|
@ -217,8 +217,7 @@ PAYPAL_CHAINS = (
|
|||
|
||||
SENTRY_DSN = env('SENTRY_DSN')
|
||||
|
||||
AMO_LANGUAGES = AMO_LANGUAGES + DEBUG_LANGUAGES
|
||||
|
||||
AMO_LANGUAGES = AMO_LANGUAGES + ('dbg',)
|
||||
LANGUAGES = lazy(lazy_langs, dict)(AMO_LANGUAGES)
|
||||
LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in AMO_LANGUAGES])
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class Command(BaseCommand):
|
|||
central_url = settings.WEBEXT_PERM_DESCRIPTIONS_URL
|
||||
locales_url = settings.WEBEXT_PERM_DESCRIPTIONS_LOCALISED_URL
|
||||
amo_locales = [l for l in settings.AMO_LANGUAGES
|
||||
if l not in ['en-US', 'dbg', 'dbr', 'dbl']]
|
||||
if l not in ['en-US', 'dbg']]
|
||||
# Fetch canonical en-US descriptions first; then l10n after.
|
||||
update_webext_descriptions_all.apply_async(
|
||||
args=[(central_url, 'en-US'),
|
||||
|
|
|
@ -173,31 +173,13 @@ SHORTER_LANGUAGES = {
|
|||
# L10n dashboard. Generally languages start here and move into AMO_LANGUAGES.
|
||||
HIDDEN_LANGUAGES = ('cy', 'hr', 'sr', 'sr-Latn', 'tr')
|
||||
|
||||
# We don't do `dbr` for now, see
|
||||
# https://github.com/mozilla/addons-server/pull/5402#discussion_r116455162
|
||||
# for a few more details
|
||||
DEBUG_LANGUAGES = ('dbl',)
|
||||
|
||||
|
||||
def lazy_langs(languages):
|
||||
from product_details import product_details
|
||||
|
||||
if not product_details.languages:
|
||||
return {}
|
||||
|
||||
language_mapping = {}
|
||||
|
||||
for lang in languages:
|
||||
if lang == 'dbl':
|
||||
lang_name = product_details.languages['dbg']['native']
|
||||
elif lang == 'dbr':
|
||||
lang_name = product_details.languages['dbg']['native'] + ' (RTL)'
|
||||
else:
|
||||
lang_name = product_details.languages[lang]['native']
|
||||
|
||||
language_mapping[lang.lower()] = lang_name
|
||||
|
||||
return language_mapping
|
||||
return dict([(i.lower(), product_details.languages[i]['native'])
|
||||
for i in languages])
|
||||
|
||||
|
||||
# Where product details are stored see django-mozilla-product-details
|
||||
|
@ -206,7 +188,7 @@ PROD_DETAILS_STORAGE = 'olympia.lib.product_details_backend.NoCachePDFileStorage
|
|||
|
||||
# Override Django's built-in with our native names
|
||||
LANGUAGES = lazy(lazy_langs, dict)(AMO_LANGUAGES)
|
||||
LANGUAGES_BIDI = ('ar', 'fa', 'fa-IR', 'he', 'dbr')
|
||||
RTL_LANGUAGES = ('ar', 'fa', 'fa-IR', 'he')
|
||||
|
||||
LANGUAGE_URL_MAP = dict([(i.lower(), i) for i in AMO_LANGUAGES])
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ def locale_html(translatedfield):
|
|||
if locale == site_locale:
|
||||
return ''
|
||||
else:
|
||||
rtl_locales = map(translation.to_locale, settings.LANGUAGES_BIDI)
|
||||
rtl_locales = map(translation.to_locale, settings.RTL_LANGUAGES)
|
||||
textdir = 'rtl' if locale in rtl_locales else 'ltr'
|
||||
return jinja2.Markup(' lang="%s" dir="%s"' % (
|
||||
jinja2.escape(translatedfield.locale), textdir))
|
||||
|
|
|
@ -36,7 +36,7 @@ def test_locale_html():
|
|||
assert s == ' lang="de" dir="ltr"'
|
||||
|
||||
# rtl language
|
||||
for lang in settings.LANGUAGES_BIDI:
|
||||
for lang in settings.RTL_LANGUAGES:
|
||||
testfield.locale = lang
|
||||
s = helpers.locale_html(testfield)
|
||||
assert s == ' lang="%s" dir="rtl"' % testfield.locale
|
||||
|
|
|
@ -136,8 +136,8 @@ class NotifyForm(happyforms.Form):
|
|||
|
||||
class FeaturedCollectionForm(happyforms.ModelForm):
|
||||
LOCALES = (('', u'(Default Locale)'),) + tuple(
|
||||
(lang, product_details.languages[lang]['native'])
|
||||
for lang in settings.AMO_LANGUAGES)
|
||||
(i, product_details.languages[i]['native'])
|
||||
for i in settings.AMO_LANGUAGES)
|
||||
|
||||
application = forms.ChoiceField(amo.APPS_CHOICES)
|
||||
collection = forms.CharField(widget=forms.HiddenInput)
|
||||
|
|
Загрузка…
Ссылка в новой задаче