[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-11-01 Thread Friedrich W. H. Kossebau
https://bugs.kde.org/show_bug.cgi?id=413390

Friedrich W. H. Kossebau  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
  Latest Commit||https://invent.kde.org/kde/
   ||kdevelop/commit/748ec8549f9
   ||9893c29169c7603a16990ddc6cf
   ||a0
   Version Fixed In||5.4.4
 Resolution|--- |FIXED

--- Comment #10 from Friedrich W. H. Kossebau  ---
Git commit 748ec8549f99893c29169c7603a16990ddc6cfa0 by Friedrich W. H.
Kossebau.
Committed on 01/11/2019 at 19:14.
Pushed by kossebau into branch '5.4'.

Fix copyright date display in About KDevelop/KDevPlatform dialogs

Passing in a plain int gets localized integer text rendering with
e.g. thousand separator (2.019), which is not what we want here.

By feedback of localization teams the original year span is used, and
not mapped into local calendar systems at least by the active teams,
so just passing in a plain string is fine for now.
Cmp. https://marc.info/?l=kde-i18n-doc=157238863619132=2
FIXED-IN:5.4.4

M  +2-1app/main.cpp
M  +2-1kdevplatform/shell/core.cpp

https://invent.kde.org/kde/kdevelop/commit/748ec8549f99893c29169c7603a16990ddc6cfa0

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-28 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=413390

--- Comment #9 from Albert Astals Cid  ---
(In reply to Albert Astals Cid from comment #8)
> QLocale::toString
> Returns a localized string representation of i.
> 
> That is not what you want.

Ah sorry i didn't realize you where passing in a date.

Why is this all so convoluted instead of just hardcoding a 2019 there?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-28 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=413390

--- Comment #8 from Albert Astals Cid  ---
QLocale::toString
Returns a localized string representation of i.

That is not what you want.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-28 Thread Friedrich W. H. Kossebau
https://bugs.kde.org/show_bug.cgi?id=413390

--- Comment #7 from Friedrich W. H. Kossebau  ---
QString::number(year) will not be localized though (and we could simply already
use the result, QStringLiteral("2019") instead :)

To get a string of a year (without just delegating to translators, as the whole
idea of this is to avoid breaking string freeze on change of year e.g. in
stable branch, one could perhaps do this, though this relies on Gregorian
calendar again, given we have to specify a day when using QDate:
--- 8< ---
const QString copyrightYearEnd = QLocale().toString(QDate(2019, 1, 1),
QStringLiteral(""));
KAboutData aboutData( QStringLiteral("kdevelop"), i18n("KDevelop"),
QStringLiteral(KDEVELOP_VERSION_STRING),
  i18n("The KDevelop Integrated Development
Environment"),
  KAboutLicense::GPL, i18n("Copyright 1999-%1, The
KDevelop developers", copyrightYearEnd),
  QString(),
QStringLiteral("https://www.kdevelop.org/;));
--- 8< ---

Going to ask on the kde-i18n-...@kde.org mailinglist what they suggest to do.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Karl Ove Hufthammer
https://bugs.kde.org/show_bug.cgi?id=413390

--- Comment #6 from Karl Ove Hufthammer  ---
> When using semantic markup (KDE User Interface Text = KUIT), one needs to
> use the xi18n call variants with KF5's KI18n API.
> See https://api.kde.org/frameworks/ki18n/html/prg_guide.html#kuit_markup
> 
> It might be more simple though to just format the year as string using the
> respective QLocale date string methods and then pass this string as arg.

According to that page, one should just use QString::number(year).
And that seems simple enough.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Friedrich W. H. Kossebau
https://bugs.kde.org/show_bug.cgi?id=413390

Friedrich W. H. Kossebau  changed:

   What|Removed |Added

 CC||kosse...@kde.org

--- Comment #5 from Friedrich W. H. Kossebau  ---
(In reply to Karl Ove Hufthammer from comment #4)
> (In reply to Nate Graham from comment #2)
> > Do we have a way to mark a number as being a year or something? That could
> > trigger logic to say, "Don't localize this number!"
> 
> Yes. See
> https://techbase.kde.org/Development/Tutorials/Localization/i18n_Semantics
> 
> The relevant quote is:
> 
> 
> By default, numbers supplied as arguments to i18n calls are formatted into
> localized form. If the number is supposed to be a numeric identifier
> instead, like a port number, use this tag to signal numeric-id environment.
> i18nc("@info:progress",
>   "Connecting to %1...", portNo);

Nope. this is pre-KF5 information. That page should get a note saying so.

When using semantic markup (KDE User Interface Text = KUIT), one needs to use
the xi18n call variants with KF5's KI18n API.
See https://api.kde.org/frameworks/ki18n/html/prg_guide.html#kuit_markup

It might be more simple though to just format the year as string using the
respective QLocale date string methods and then pass this string as arg.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Karl Ove Hufthammer
https://bugs.kde.org/show_bug.cgi?id=413390

Karl Ove Hufthammer  changed:

   What|Removed |Added

 CC||k...@huftis.org

--- Comment #4 from Karl Ove Hufthammer  ---
(In reply to Nate Graham from comment #2)
> Do we have a way to mark a number as being a year or something? That could
> trigger logic to say, "Don't localize this number!"

Yes. See
https://techbase.kde.org/Development/Tutorials/Localization/i18n_Semantics

The relevant quote is:


By default, numbers supplied as arguments to i18n calls are formatted into
localized form. If the number is supposed to be a numeric identifier instead,
like a port number, use this tag to signal numeric-id environment.
i18nc("@info:progress",
  "Connecting to %1...", portNo);

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Francis Herne
https://bugs.kde.org/show_bug.cgi?id=413390

--- Comment #3 from Francis Herne  ---
I don't know. Did you add one when you added the behaviour?

(Not that I can find)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=413390

Nate Graham  changed:

   What|Removed |Added

 CC||aa...@kde.org,
   ||cf...@kde.org, n...@kde.org

--- Comment #2 from Nate Graham  ---
Do we have a way to mark a number as being a year or something? That could
trigger logic to say, "Don't localize this number!"

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 413390] Date in 'Help/About KDevelop' shows year "2.019" instead of "2019"

2019-10-24 Thread Francis Herne
https://bugs.kde.org/show_bug.cgi?id=413390

Francis Herne  changed:

   What|Removed |Added

 CC||m...@flherne.uk
 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

--- Comment #1 from Francis Herne  ---
Confirmed. Also happens in English, with "2,019".

This is due to a breaking change in v5.62 of the ki18n library:

https://phabricator.kde.org/D22069

-- 
You are receiving this mail because:
You are watching all bug changes.