[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Different formulas for plurals in Qt and KDE
From: Alexander Potashev <aspotashev () gmail ! com>
Date: 2014-05-15 17:59:37
Message-ID: 1684838.2P4KztUkkL () meth
[Download RAW message or body]
В письме от 15 мая 2014 19:42:34 пользователь Albert Astals Cid написал:
> El Dijous, 15 de maig de 2014, a les 10:46:51, Alexander Potashev va
escriure:
> > About documentation: are there any Wiki pages on TechBase describing
> > Scripty yet?
>
> What kind of description to you want?
Hi Albert,
I was just looking for a place where I could write a paragraph about plural
formula adjustment. This page [1] looks appropriate.
Please review my patch for Scripty (attached).
[1]
http://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems
--
Alexander Potashev
["kf5-autoadjust-plurals.patch" (kf5-autoadjust-plurals.patch)]
Index: scripts/check_po_files
===================================================================
--- scripts/check_po_files (revision 1387035)
+++ scripts/check_po_files (working copy)
@@ -9,10 +9,23 @@
for lang in `cat subdirs`; do
# Note: we do not use 'cd' here, to allow msgfmt to generate errors and \
warnings with paths containing the language code
+ # In l10n-kde4, plural header adjustment was done like this:
if test -f $lang/messages/kdelibs/kdelibs4.po; then
find $lang -name *.po | xargs perl scripts/change-header.pl \
$lang/messages/kdelibs/kdelibs4.po fi
+ # KF5: copy plural headers from kcoreaddons5_qt.po to all other Qt-based \
catalogs + QT_PLURAL_MASTER="$lang/messages/frameworks/kcoreaddons5_qt.po"
+ if test -f "$QT_PLURAL_MASTER" ; then
+ find $lang -name *_qt.po | xargs perl scripts/change-header.pl \
"$QT_PLURAL_MASTER" + fi
+
+ # KF5: copy plural headers from ki18n5.po to all other KI18n-based catalogs
+ KI18N_PLURAL_MASTER="$lang/messages/frameworks/ki18n5.po"
+ if test -f "$KI18N_PLURAL_MASTER" ; then
+ find $lang -name *.po ! -name *_qt.po | xargs perl \
scripts/change-header.pl "$KI18N_PLURAL_MASTER" + fi
+
# Check all PO files with Gettext's msgfmt
find $lang -name \*.po | xargs -r -n1 msgfmt --check-header -o /dev/null
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic