Bug 319853 - Untranslatable strings in timeline tab
Summary: Untranslatable strings in timeline tab
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-i18n (show other bugs)
Version: 3.1.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 02:22 UTC by André Marcelo Alvarenga
Modified: 2021-12-30 16:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.3.0


Attachments
Screenshot (20.64 KB, image/png)
2013-05-15 02:23 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 2013-05-15 02:22:28 UTC
There are 3 strings untranslatable:

Start:
End:
%1 items 

See screenshot.

Reproducible: Always
Comment 1 André Marcelo Alvarenga 2013-05-15 02:23:15 UTC
Created attachment 79890 [details]
Screenshot
Comment 2 caulier.gilles 2013-05-15 07:22:47 UTC
"Start" is the time-line item selected.
"end" is the last time-line item selected
%1 items is the numbers of items from selection.

Do you have tried to use time-line through vertical cursor to make a selection ?

Gilles Caulier
Comment 3 Burkhard Lück 2013-05-15 09:39:37 UTC
digikam/date/timelinewidget.cpp#328 has:

infoDate = i18nc("Week #weeknumber - month name - year string\nStart:\tEnd: ",
                             "Week #%1 - %2 %3\n%4\t%5",
                             weekNb,
                             d->calendar->monthName(date),
                             d->calendar->formatDate(date, "%Y"),
                             "Start: " + d->calendar->formatDate(date,    KLocale::Day, KLocale::LongNumber),
                             "End: "   + d->calendar->formatDate(endDate, KLocale::Day, KLocale::LongNumber));

Missing i18n call for "Start: " and "End: ", so both strings are untranslatable.
No idea where "0 item"/"%1 items" displyaed in the widget is in the code.
Comment 4 caulier.gilles 2013-05-16 08:19:04 UTC
Burkhard,

"item(s)" string is implemented in leftsidebarwidgets.cpp::TimelineSideBarWidget::slotCursorPositionChanged()

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/digikam/views/leftsidebarwidgets.cpp#L699

Gilles Caulier
Comment 5 caulier.gilles 2013-05-16 08:42:40 UTC
Git commit f6154395abbf034db033296ceb480a88131e948d by Gilles Caulier.
Committed on 16/05/2013 at 10:41.
Pushed by cgilles into branch 'master'.

fix missing i18n
constify and polish

M  +41   -41   digikam/date/timelinewidget.cpp
M  +6    -6    digikam/date/timelinewidget.h
M  +56   -55   digikam/views/leftsidebarwidgets.cpp
M  +42   -42   digikam/views/leftsidebarwidgets.h

http://commits.kde.org/digikam/f6154395abbf034db033296ceb480a88131e948d
Comment 6 Burkhard Lück 2013-05-16 10:31:58 UTC
digikam/views/leftsidebarwidgets.cpp#699

    if (val >= 2)
        d->cursorCountLabel->setText(i18n("%1 items", QString::number(val)));
    else
        d->cursorCountLabel->setText(i18n("%1 item", QString::number(val)));

It is impossible to translate this properly in languages with different plural forms than english, see:
http://techbase.kde.org/Development/Tutorials/Localization/i18n#Plurals

Please use i18np() call
Comment 7 caulier.gilles 2013-05-16 10:45:19 UTC
Git commit 949ab3b1c472324a1327690ca0cbff8406d7230e by Gilles Caulier.
Committed on 16/05/2013 at 12:44.
Pushed by cgilles into branch 'master'.

use i18np

M  +1    -5    digikam/views/leftsidebarwidgets.cpp

http://commits.kde.org/digikam/949ab3b1c472324a1327690ca0cbff8406d7230e