-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zh-TW] Time string rendered into a wired "B"time #9902
Comments
Hello @petercpg ! Thank you for logging this. This was also tracked in the past, here - https://mozilla-hub.atlassian.net/browse/VPN-4488 . We should decide on the validity of this issue. CC: @albionx @flodolo |
FYI, Peter is part of our community of volunteers and doesn't have access to internal Jira tickets. Clearly this is a valid issue, probably coming out of qt libraries. |
@petercpg Time for Examples from Firefox console
https://cldr.unicode.org/translation/date-time/date-time-patterns#basic-time-formats
That seems indeed like a bug in qt, or in the library they use to access CLDR-based functions. |
Is it possible to expose date format strings to l10n, so localizers can override them, or for zh-TW, use |
I would really prefer to avoid exposing strings for date/time formatting. |
At least Qt 6.7.2 seems to work correctly, so maybe the issue is in the VPN code #include <QCoreApplication>
#include <QLocale>
#include <QTime>
#include <QDateTime>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QTime currentTime = QTime::currentTime();
QLocale locale_en_US(QLocale("en-US"));
QLocale locale_zh_Hant(QLocale("zh-Hant"));
QLocale locale_zh_TW(QLocale("zh-TW"));
// Format time in different locales
QString time_en_US = locale_en_US.toString(currentTime, QLocale::ShortFormat);
QString time_zh_Hant = locale_zh_Hant.toString(currentTime, QLocale::ShortFormat);
QString time_zh_TW = locale_zh_TW.toString(currentTime, QLocale::ShortFormat);
// Output the formatted times
qDebug() << "Time for en-US (short format):" << time_en_US;
qDebug() << "Time for zh-Hant (short format):" << time_zh_Hant;
qDebug() << "Time for zh-TW:" << time_zh_TW;
return a.exec();
}
|
Describe the bug
When the VPN App is in zh-TW locale, times in UI are prefixed with a "B" character.
VPN version:
Affected Platforms:
Prerequisites:
N/A
Steps to reproduce:
Expected result:
Actual result:
B
character, eg.,Last Updated: B22:35
.Additional notes:
The string in localization do not have redundant character either.
https://github.com/mozilla-l10n/mozilla-vpn-client-l10n/blob/8bd871f5604ffcf26f89c60be1b66da7a650b5d7/zh_TW/mozillavpn.xliff#L1924
The text was updated successfully, but these errors were encountered: