Skip to content

Commit

Permalink
fix: no translation for time in greeter
Browse files Browse the repository at this point in the history
Set locale to the current user's locale when firstly entering system

Issue: linuxdeepin/developer-center#6994
  • Loading branch information
wangfei committed Jan 22, 2024
1 parent 8444939 commit b513940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/session-widgets/lockcontent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void LockContent::onCurrentUserChanged(std::shared_ptr<User> user)
m_user = user;

m_localeName = regionValue(localeName_key);
QLocale locale = m_localeName.isEmpty()? QLocale::system() : QLocale(m_localeName);
QLocale locale = m_localeName.isEmpty()? user->locale() : QLocale(m_localeName);
m_shortTimeFormat = regionValue(shortTimeFormat_key);
m_longDateFormat = regionValue(longDateFormat_key);
buildConnect();
Expand Down

0 comments on commit b513940

Please sign in to comment.