Bug 503867 - The date and time runner doesn't use localized names for locations, some commands ignore the localized keyword and display weird behaviour. Commands for time conversion don't seem to work regardless of locale
Summary: The date and time runner doesn't use localized names for locations, some comm...
Status: REPORTED
Alias: None
Product: krunner
Classification: Plasma
Component: datetime (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-07 01:25 UTC by Live
Modified: 2025-05-07 14:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Ora London, IT (60.18 KB, image/png)
2025-05-07 07:35 UTC, Live
Details
time in Brazil, IT (212.97 KB, image/png)
2025-05-07 07:36 UTC, Live
Details
ora Brazil, IT (397.66 KB, image/png)
2025-05-07 07:38 UTC, Live
Details
time en Brazil, ESP (169.27 KB, image/png)
2025-05-07 07:39 UTC, Live
Details
hora Brazil, ESP (297.61 KB, image/png)
2025-05-07 07:39 UTC, Live
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Live 2025-05-07 01:25:10 UTC
STEPS TO REPRODUCE
1: Set the language to Italian, install the date and time addon if missing
2: Open krunner, write "ora Londra"
3: Open krunner, write "ora London"
4: Open krunner, write "time in Brazil"
5: Open krunner, write "ora a Brazil"
6: Open krunner, write "12:00 PM in gmt-2"

OBSERVED RESULT
For step 2, there's no output.
For step 3, the command outputs correctly the current time in London.
For step 4, the command outputs a short list of locations in the country, but it uses the time in China as a reference, with some locations duplicated two times to account for multiple time zones in China. The output also seems to be cut short.
For step 5, the command outputs a higher number of locations compared to step 4. The time used for reference is the local one.
For step 6, which is an example of time conversion used in the autotests source code for the addon, there's no output.

EXPECTED RESULT
For step 2, the addon should look for the localized locations and output the current time. Instead it only works if the English location name is used.
For step 3, the command should be ignored, or accepted in case the plugin was able to correctly recognize multiple localizations for the same location. At that point, the "time" keyword should be recognized as well though.
For step 4, same as step 3. Instead, it somehow outputs a fewer number of locations compared to step 5, and in any case it shouldn't display multiple time zones in China as reference.
For step 5, there should be the same expected result as step 2/3, either recognizing the localized version of the location or ignoring the command.
For step 6, looking at the source code for autotests and at the history of commits, the addon should be able to do time conversions, but I can't get any of the commands to work even even if the locale is set to English.

SOFTWARE/OS VERSIONS, ADDITIONAL INFORMATION
I checked if the issues were present on a freshly made usb drive running a live version of Kubuntu 25.04 and selecting the Italian language at the last prompt before logging on the desktop. After that, I installed plasma-runners-addons, which is not installed as default, and enabled the runner. I also verified that the same issues are present on two different machines running Kubuntu 24.10, while on a live environment of Debian 12 I was only able to reproduce steps 2,3,5 and 6, with step 4 not working.
Localization shouldn't be the issue, since going to the time zones tab in the settings shows them correctly localized.
To make sure it wasn't an Italian-only issue, I tried rebooting and picked Spanish. The results are the same, only English location names are recognized and "hora en Brazil" returns the same shortened list defaulting to China as a reference time. 
I finally rebooted again and used the default English locale to try again step 6, but I wasn't able to run any time conversion example correctly.

For Kubuntu 24.10,
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.6.2
Kernel Version: 6.11.0-25-generic (64 bit)

For Kubuntu 25.04, 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3
Kernel Version: 6.14.0-15-generic (64 bit)
Comment 1 Live 2025-05-07 07:35:18 UTC
Created attachment 181018 [details]
Ora London, IT
Comment 2 Live 2025-05-07 07:36:09 UTC
Created attachment 181019 [details]
time in Brazil, IT
Comment 3 Live 2025-05-07 07:38:04 UTC
Created attachment 181020 [details]
ora Brazil, IT
Comment 4 Live 2025-05-07 07:39:09 UTC
Created attachment 181021 [details]
time en Brazil, ESP
Comment 5 Live 2025-05-07 07:39:37 UTC
Created attachment 181022 [details]
hora Brazil, ESP
Comment 6 Live 2025-05-07 07:44:57 UTC
Update 1: I've uploaded some screenshots that show consistent behaviour between Italian and Spanish. I also noticed I made a mistake in the original report about the command that defaults to local time in China in Spanish: it's not "hora en Brazil", it's "time en Brazil", which also means that the "time" keyword is triggered when followed by a translated "in", something I missed in Italian since it's the same. I'll try to check if the same issues also appear in KDE Neon next and follow up later.
Comment 7 Live 2025-05-07 13:42:26 UTC
Update 2: After booting up a live of the latest KDE Neon Testing (20250506-0436), installing language-pack-it, changing the system language to it_IT and logging out/back in again, I've verified that the bugs are indeed still there in the latest plasma version, with the same exact behaviour as the Kubuntu variants.