Frameworks/Epics/KF5.0 Release Preparation/l10n: Difference between revisions

From KDE Community Wiki
 
(55 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Preparation ==
== Common tasks ==


{| class="sortable" border="1" cellpadding="5" cellspacing="0" style="border: gray solid 1px; border-collapse: collapse; text-align: left; width:100%;"
{| class="sortable" border="1" cellpadding="5" cellspacing="0" style="border: gray solid 1px; border-collapse: collapse; text-align: left; width:100%;"
Line 6: Line 6:
! Task
! Task
! Coordination
! Coordination
{{FeatureDone | Decide where to place Messages.sh (src by default?) | }}
{{FeatureDone | Decide where to place Messages.sh. Answer: src/ by default | }}
{{FeatureInProgress | Define the way to extract translations for Qt-based frameworks. Patches under review.
{{FeatureDone | Check the release scripts to ensure they include the .po or .ts files as well as the matching CMake code to build and install them. | }}
| }}
{{FeatureDone | Get scripty to run on l10n-kf5 | }}
{{FeatureDone | Investigate whether it is possible to have Qt-based frameworks automatically load their transitions | }}
{{FeatureTodo |Check the release scripts to ensure they include the .po or .ts files as well as the matching CMake code to build and install them.
| }}
|}
|}


== Per framework TODO ==
== KI18n-based frameworks ==
For each framework the following needs to be done:


=== Mark strings translatable ===
Framework list:
Make sure all strings that need to be translated are either wrapped by i18n*() or tr*() depending on the translation API of choice.


=== Extract translatable strings ===
* frameworkintegration
If there is no Messages.sh file in the repository, create a src/Messages.sh file. See http://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems#handling_i18n_in_KDE.27s_subversion_repository for details on how to create and test it.
* kactivities
 
* kcmutils
If there are Messages.sh files, check they are still relevant.
* kconfigwidgets
 
* kdeclarative
Things to test:
* kdelibs4support
* Make sure the Messages.sh files extract all the files
* kdesu
* Make sure the Messages.sh files create catalogs with correct names. Look out for catalogs with '4' suffix, or catalogs whose name would clash with an existing KDE4 library.
* kdoctools (Only if SIMPLE_XSLT is not defined => Should we care?)
 
* kfileaudiopreview
=== Make sure translations are loaded ===
* khtml
If using ki18n, make sure it follows http://api.kde.org/frameworks-api/frameworks5-apidocs/ki18n/html/prg_guide.html#link_lib . In short: Check all files with calls to i18n*() define TRANSLATION_DOMAIN '''before''' including KLocalizedString.
* ki18n
 
* kiconthemes
If using tr(), make sure the list of source files include ${ECM_TR_LOADER}.
* kinit
* kio
* kjsembed
* knewstuff
* knotifyconfig
* kparts
* kpty
* kross
* kservice
* ktexteditor
* ktextwidgets
* kunitconversion
* kwallet
* kxmlgui
* plasma-framework


=== Status ===
=== Status ===
Line 39: Line 48:
|- style="background: #ececec; white-space:nowrap;"
|- style="background: #ececec; white-space:nowrap;"
! Status
! Status
! Framework (Translation API)
! Task
! Coordination
! Coordination
{{FeatureDone | attica (-) | }}
{{ FeatureDone | Add src/Messages.sh scripts | }}
{{FeatureDone | KI18n (-) | }}
{{ FeatureDone | Review existing Messages.sh scripts. Check for wrong names such as catalogs with '4' suffix, or catalogs whose name would clash with an existing KDE4 library. | }}
{{FeatureTodo | kactivities (KI18n) | }}
{{ FeatureDone | Make sure translations are loaded, meaning TRANSLATION_DOMAIN is set. This could be done as a -D switch by the build system. | }}
{{FeatureDone | karchive (-) | }}
{{ FeatureDone |- kdeclarative: -DTRANSLATION_DOMAIN conflicts with RootContext::i18n. | }}
{{FeatureTodo | kauth (Qt) | }}
{{ FeatureDone |- kross: -DTRANSLATION_DOMAIN conflicts with TranslationModule::i18n. | }}
{{FeatureTodo | kbookmarks (Qt) | }}
{{ FeatureDone |- ktexteditor: -DTRANSLATION_DOMAIN conflicts with i18n() in katescripthelpers.cpp. | }}
{{FeatureTodo | kcmutils (KI18n) | }}
{{ FeatureDone | Create cmake functions to simplify translation integration. https://git.reviewboard.kde.org/r/117804/ https://git.reviewboard.kde.org/r/117805/ | }}
{{FeatureTodo | kcodecs (Qt) | }}
{{ FeatureDone | kdeclarative: Find a way to get qml code translated (only two strings so far). | }}
{{FeatureTodo | kcompletion (Qt) | }}
{{ FeatureDone | Fix calls to kde4_install_ts_files in trunk/l10n-kf5/scripts/autogen.sh | }}
{{FeatureTodo | kconfig (KI18n) | }}
{{ FeatureDone | Fix support for multiple .po files named the same https://git.reviewboard.kde.org/r/117997/ | }}
{{FeatureTodo | kconfigwidgets (KI18n) | }}
{{ FeatureDone | Fix support for multiple .docbook files named the same https://git.reviewboard.kde.org/r/118004/ | }}
{{FeatureTodo | kcoreaddons (Qt) | }}
{{ FeatureDone | Integrate translation compilation code (depends on support for multiple .po and .docbook files) | }}
{{FeatureTodo | kcrash (Qt) | }}
{{FeatureTodo | kdbusaddons (Qt) | }}
{{FeatureTodo | kde4support (KI18n) | }}
{{FeatureDone | kdeclarative (-) | }}
{{FeatureDone | kded (-) | }}
{{FeatureTodo | kdesignerplugin (Qt) | }}
{{FeatureDone | kdesu (-) | }}
{{FeatureDone | kdewebkit (-) | }}
{{FeatureTodo | kdnssd-framework (Qt) | }}
{{FeatureTodo | kdoctools (KI18n) | }}
{{FeatureDone | kemoticons (-) | }}
{{FeatureDone | kf5umbrella (-) | }}
{{FeatureTodo | kfileaudiopreview (KI18n) | }}
{{FeatureTodo | kglobalaccel (Qt) | }}
{{FeatureDone | kguiaddons (-) | }}
{{FeatureTodo | khtml (KI18n) | }}
{{FeatureTodo | ki18n (KI18n) | }}
{{FeatureTodo | kiconthemes (KI18n) | }}
{{FeatureDone | kidletime (-) | }}
{{FeatureDone | kimageformats (-) | }}
{{FeatureTodo | kinit (KI18n) | }}
{{FeatureTodo | kio (KI18n) | }}
{{FeatureDone | kitemmodels (-) | }}
{{FeatureTodo | kitemviews (Qt) | }}
{{FeatureTodo | kjobwidgets (Qt) | }}
{{FeatureDone | kjs (-) | }}
{{FeatureTodo | kjsembed (KI18n) | }}
{{FeatureDone | kmediaplayer (-) | }}
{{FeatureTodo | knewstuff (KI18n) | }}
{{FeatureTodo | knotifications (Qt) | }}
{{FeatureTodo | knotifyconfig (KI18n) | }}
{{FeatureTodo | kparts (KI18n) | }}
{{FeatureDone | kplotting (-) | }}
{{FeatureTodo | kprintutils (KI18n) | }}
{{FeatureTodo | kpty (KI18n) | }}
{{FeatureTodo | kross (KI18n) | }}
{{FeatureTodo | krunner (KI18n) | }}
{{FeatureTodo | kservice (KI18n) | }}
{{FeatureTodo | ktexteditor (KI18n) | }}
{{FeatureTodo | ktextwidgets (KI18n) | }}
{{FeatureTodo | kunitconversion (KI18n) | }}
{{FeatureTodo | kwallet (KI18n) | }}
{{FeatureTodo | kwidgetsaddons (Qt) | }}
{{FeatureTodo | kwindowsystem (KI18n) | }}
{{FeatureTodo | kxmlgui (KI18n) | }}
{{FeatureTodo | plasma-framework (KI18n) | }}
{{FeatureTodo | solid (Qt) | }}
{{FeatureTodo | sonnet (Qt) | }}
{{FeatureDone | threadweaver (-) | }}
|}
|}


==== Check QObject::tr usage ====
== Qt-based frameworks ==


Test the Messages.sh script, fix any errors it reports.
Framework list:


Errors to ignore:
* kauth
* kbookmarks
* kcodecs
* kcompletion
* kcoreaddons
* kdbusaddons
* kdesignerplugin
* kdnssd
* kglobalaccel
* kitemviews
* kjobwidgets
* knotifications
* kwidgetsaddons
* kwindowsystem
* solid
* sonnet


* "Unsupported encoding Latin1": caused by lupdate not being aware that QCoreApplication::translate() does not accept an encoding parameter anymore.
=== Status ===
* "Ignoring definition of undeclared qualified class": to be further investigated, but I don't think it matters


{| class="sortable" border="1" cellpadding="5" cellspacing="0" style="border: gray solid 1px; border-collapse: collapse; text-align: left; width:100%;"
{| class="sortable" border="1" cellpadding="5" cellspacing="0" style="border: gray solid 1px; border-collapse: collapse; text-align: left; width:100%;"
|- style="background: #ececec; white-space:nowrap;"
|- style="background: #ececec; white-space:nowrap;"
! Status
! Status
! Framework (Translation API)
! Task
! Coordination
! Coordination
{{FeatureDone | kauth (Qt) | }}
{{ FeatureDone | Define the way to extract translations for Qt-based frameworks. | }}
{{FeatureDone | kbookmarks (Qt) | }}
{{ FeatureDone | Investigate whether it is possible to have Qt-based frameworks automatically load their transitions. Answer: yes, via a Qt macro. | }}
{{FeatureDone | kcodecs (Qt) | }}
{{ FeatureDone | Add src/Messages.sh script | }}
{{FeatureDone | kcompletion (Qt) | }}
{{ FeatureDone | Check QObject::tr is correctly used | }}
{{FeatureDone | kcoreaddons (Qt) | }}
{{ FeatureDone | Define the way to integrate compilation of translations in build system. Done: new function added to ECM: ecm_create_qm_from_po_files() | }}
{{FeatureDone | kcrash (Qt) | }}
{{ FeatureDone | Integrate translation compilation code | }}
{{FeatureDone | kdbusaddons (Qt) | }}
{{ FeatureDone | Update framework template | }}
{{FeatureDone | kdesignerplugin (Qt) | }}
{{ FeatureDone | Extract strings from .ui files| }}
{{FeatureDone | kdnssd (Qt) | }}
{{ FeatureDone | solid: fix string extraction: it uses $XGETTEXT and $XGETTEXT_QT | }}
{{FeatureDone | kglobalaccel (Qt) | }}
{{ FeatureDone | kwidgetsaddons: Check data for KCharSelectData is marked as translatable. See FIXME in the code | }}
{{FeatureDone | kitemviews (Qt) | }}
{{ FeatureDone | kcoreaddons: check src/mimetypes/XmlMessages.sh. Check it still works and add a "5" suffix to the .po file | }}
{{FeatureDone | kjobwidgets (Qt) | }}
{{ FeatureDone | Adjust ECM qm handling code to work with trunk/l10n-kf5 workflow. https://git.reviewboard.kde.org/r/117560/| }}
{{FeatureDone | knotifications (Qt) | }}
{{ FeatureDone | Add a "_qt" suffix to the catalog names | }}
{{FeatureInProgress | kwidgetsaddons (Qt) One needs to check data for KCharSelectData is marked as translatable. See FIXME in the code | }}
{{ FeatureDone | l10n-kf5: Modify scripts/autogen.sh to create different CMake code depending on whether the .po file must be compiled into a .qm or into a .mo. A .po which must be compiled into a .qm if its catalog name ends with "_qt" | }}
{{FeatureDone | solid (Qt) | }}
{{ FeatureDone | Figure out the best way to handle plural forms: right now Qt requires the creation of a plural-only .qm file for english. | }}
{{FeatureDone | sonnet (Qt) | }}
|}
|}

Latest revision as of 13:14, 13 May 2014

Common tasks

Status Task Coordination
DONE Decide where to place Messages.sh. Answer: src/ by default
DONE Check the release scripts to ensure they include the .po or .ts files as well as the matching CMake code to build and install them.
DONE Get scripty to run on l10n-kf5

KI18n-based frameworks

Framework list:

  • frameworkintegration
  • kactivities
  • kcmutils
  • kconfigwidgets
  • kdeclarative
  • kdelibs4support
  • kdesu
  • kdoctools (Only if SIMPLE_XSLT is not defined => Should we care?)
  • kfileaudiopreview
  • khtml
  • ki18n
  • kiconthemes
  • kinit
  • kio
  • kjsembed
  • knewstuff
  • knotifyconfig
  • kparts
  • kpty
  • kross
  • kservice
  • ktexteditor
  • ktextwidgets
  • kunitconversion
  • kwallet
  • kxmlgui
  • plasma-framework

Status

Status Task Coordination
DONE Add src/Messages.sh scripts
DONE Review existing Messages.sh scripts. Check for wrong names such as catalogs with '4' suffix, or catalogs whose name would clash with an existing KDE4 library.
DONE Make sure translations are loaded, meaning TRANSLATION_DOMAIN is set. This could be done as a -D switch by the build system.
DONE - kdeclarative: -DTRANSLATION_DOMAIN conflicts with RootContext::i18n.
DONE - kross: -DTRANSLATION_DOMAIN conflicts with TranslationModule::i18n.
DONE - ktexteditor: -DTRANSLATION_DOMAIN conflicts with i18n() in katescripthelpers.cpp.
DONE Create cmake functions to simplify translation integration. https://git.reviewboard.kde.org/r/117804/ https://git.reviewboard.kde.org/r/117805/
DONE kdeclarative: Find a way to get qml code translated (only two strings so far).
DONE Fix calls to kde4_install_ts_files in trunk/l10n-kf5/scripts/autogen.sh
DONE Fix support for multiple .po files named the same https://git.reviewboard.kde.org/r/117997/
DONE Fix support for multiple .docbook files named the same https://git.reviewboard.kde.org/r/118004/
DONE Integrate translation compilation code (depends on support for multiple .po and .docbook files)

Qt-based frameworks

Framework list:

  • kauth
  • kbookmarks
  • kcodecs
  • kcompletion
  • kcoreaddons
  • kdbusaddons
  • kdesignerplugin
  • kdnssd
  • kglobalaccel
  • kitemviews
  • kjobwidgets
  • knotifications
  • kwidgetsaddons
  • kwindowsystem
  • solid
  • sonnet

Status

Status Task Coordination
DONE Define the way to extract translations for Qt-based frameworks.
DONE Investigate whether it is possible to have Qt-based frameworks automatically load their transitions. Answer: yes, via a Qt macro.
DONE Add src/Messages.sh script
DONE Check QObject::tr is correctly used
DONE Define the way to integrate compilation of translations in build system. Done: new function added to ECM: ecm_create_qm_from_po_files()
DONE Integrate translation compilation code
DONE Update framework template
DONE Extract strings from .ui files
DONE solid: fix string extraction: it uses $XGETTEXT and $XGETTEXT_QT
DONE kwidgetsaddons: Check data for KCharSelectData is marked as translatable. See FIXME in the code
DONE kcoreaddons: check src/mimetypes/XmlMessages.sh. Check it still works and add a "5" suffix to the .po file
DONE Adjust ECM qm handling code to work with trunk/l10n-kf5 workflow. https://git.reviewboard.kde.org/r/117560/
DONE Add a "_qt" suffix to the catalog names
DONE l10n-kf5: Modify scripts/autogen.sh to create different CMake code depending on whether the .po file must be compiled into a .qm or into a .mo. A .po which must be compiled into a .qm if its catalog name ends with "_qt"
DONE Figure out the best way to handle plural forms: right now Qt requires the creation of a plural-only .qm file for english.