Bug 368575 - Untranslatable strings in BQM-File Renaming (Date & Time dialog)
Summary: Untranslatable strings in BQM-File Renaming (Date & Time dialog)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-i18n (show other bugs)
Version: 5.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-11 05:33 UTC by André Marcelo Alvarenga
Modified: 2021-12-30 16:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.0


Attachments
Screenshot (44.92 KB, image/png)
2016-09-11 05:38 UTC, André Marcelo Alvarenga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description André Marcelo Alvarenga 2016-09-11 05:33:21 UTC
See screenshot. The highlighted strings are untranslatable:

example:

Standard
ISO
Text
UnixTimeStamp
Custom

Reproducible: Always
Comment 1 André Marcelo Alvarenga 2016-09-11 05:38:20 UTC
Created attachment 101028 [details]
Screenshot
Comment 2 caulier.gilles 2016-09-11 22:35:25 UTC
The text come from .UI files from Advanced Renamed tool used by BQM.

The file are parsed by Messagess.sh script for string extraction :

[gilles@localhost core]$ pwd
/home/gilles/Devel/5.x/core

[gilles@localhost core]$ cat Messages.sh 
#! /bin/sh
$EXTRACTRC `find . -name \*.rc -o -name \*.ui | grep -v '/tests/'` >> rc.cpp || exit 11
$XGETTEXT `find . -name \*.h -o -name \*.cpp | grep -v '/tests/'` `find app -name \*.h.cmake.in` -o $podir/digikam.pot
rm -f rc.cpp
gilles@localhost core]$ find . -name \*.rc -o -name \*.ui
...
./utilities/advancedrename/parser/modifiers/rangemodifierdialogwidget.ui
./utilities/advancedrename/parser/modifiers/replacemodifierdialogwidget.ui
./utilities/advancedrename/parser/modifiers/fillmodifierdialogwidget.ui
./utilities/advancedrename/parser/options/dateoptiondialogwidget.ui
...

Gilles Caulier
Comment 3 Burkhard Lück 2016-09-12 06:01:36 UTC
Untranslated in recent master build from sources in locale de + x-test

dateoption.cpp:240:    QString result = QString::fromUtf8("example: %1").arg(formattedDateTime(QDateTime::currentDateTime()));
"example: %1" not extracted

dateoption.cpp:252:    addToken(QLatin1String("[date:||key||]"),    i18n("Date and time (||key|| = Standard|ISO|UnixTimeStamp|Text)"));
This does apparently not work with xgettext

dateoption.cpp:61:    m_map.insert(Custom,        DateFormatDescriptor(QLatin1String("Custom"),         QVariant()));
"Custom" not extracted
Comment 4 caulier.gilles 2016-09-12 15:35:00 UTC
Git commit 83becf3c1cc64dd619ef74cb0094bb8ad6752891 by Gilles Caulier.
Committed on 12/09/2016 at 15:34.
Pushed by cgilles into branch 'master'.

fix not i18n strings
FIXED-IN: 5.2.0

M  +2    -1    NEWS
M  +8    -8    utilities/advancedrename/parser/options/dateoption.cpp
M  +10   -7    utilities/advancedrename/parser/options/dateoption.h

http://commits.kde.org/digikam/83becf3c1cc64dd619ef74cb0094bb8ad6752891