Skip to content
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

Make client language gender-neutral and more clear #4667

Merged
merged 1 commit into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cmd/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class EchoDisabler
QString queryPassword(const QString &user)
{
EchoDisabler disabler;
std::cout << "Password for user " << qPrintable(user) << ": ";
std::cout << "Password for account with username " << qPrintable(user) << ": ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just "Password for account " is enough.

std::string s;
std::getline(std::cin, s);
return QString::fromStdString(s);
Expand Down Expand Up @@ -383,7 +383,7 @@ int main(int argc, char **argv)

if (options.interactive) {
if (user.isEmpty()) {
std::cout << "Please enter user name: ";
std::cout << "Please enter username: ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the same though. ;) We should not have the word "user" anywhere, thus "Please enter account name: " would be a proper fix.

std::string s;
std::getline(std::cin, s);
user = QString::fromStdString(s);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/UserStatusSelectorDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.nextcloud.desktopclient 1.0 as NC
Window {
id: dialog

title: qsTr("Set user status")
title: qsTr("Set account status")

property NC.UserStatusSelectorModel model: NC.UserStatusSelectorModel {
onFinished: dialog.close()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Application::Application(int &argc, char **argv)
nullptr,
tr("Error accessing the configuration file"),
tr("There was an error while accessing the configuration "
"file at %1. Please make sure the file can be accessed by your user.")
"file at %1. Please make sure the file can be accessed by your system account.")
.arg(ConfigFile().configFile()),
tr("Quit %1").arg(Theme::instance()->appNameGUI()));
QTimer::singleShot(0, qApp, SLOT(quit()));
Expand Down
2 changes: 1 addition & 1 deletion src/gui/authenticationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &realm, const QString &
lay->addWidget(label);

auto *form = new QFormLayout;
form->addRow(tr("&User:"), _user);
form->addRow(tr("&Username:"), _user);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is actual wording, but "Account" would be correct here too.

form->addRow(tr("&Password:"), _password);
lay->addLayout(form);
_password->setEchoMode(QLineEdit::Password);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/creds/httpcredentialsgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void HttpCredentialsGui::showDialog()
{
QString msg = tr("Please enter %1 password:<br>"
"<br>"
"User: %2<br>"
"Username: %2<br>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Account: " here too

"Account: %3<br>")
.arg(Utility::escape(Theme::instance()->appNameGUI()),
Utility::escape(_user),
Expand Down
6 changes: 3 additions & 3 deletions src/gui/creds/oauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ void OAuth::start()
}
if (!_expectedUser.isNull() && user != _expectedUser) {
// Connected with the wrong user
QString message = tr("<h1>Wrong user</h1>"
"<p>You logged-in with user <em>%1</em>, but must login with user <em>%2</em>.<br>"
QString message = tr("<h1>Wrong account</h1>"
"<p>You logged in with the account <em>%1</em>, but must log in with the account <em>%2</em>.<br>"
"Please log out of %3 in another tab, then <a href='%4'>click here</a> "
"and log in as user %2</p>")
"and log in with %2</p>")
.arg(user, _expectedUser, Theme::instance()->appNameGUI(),
authorisationLink().toString(QUrl::FullyEncoded));
httpReplyAndClose(socket, "200 OK", message.toUtf8().constData());
Expand Down
6 changes: 3 additions & 3 deletions src/gui/creds/webflowcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ void WebFlowCredentials::askFromUser() {
_askDialog->setUrl(url);
}

QString msg = tr("You have been logged out of %1 as user %2. Please login again.")
.arg(_account->displayName(), _user);
QString msg = tr("You have been logged out of your account %1 at %2. Please login again.")
claucambra marked this conversation as resolved.
Show resolved Hide resolved
.arg(_user, _account->displayName());
_askDialog->setInfo(msg);

_askDialog->show();
Expand All @@ -186,7 +186,7 @@ void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user,
} else {
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";

QString msg = tr("Please login with the user: %1")
QString msg = tr("Please login with the account: %1")
.arg(_user);
_askDialog->setError(msg);

Expand Down
8 changes: 4 additions & 4 deletions src/gui/folderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ QString FolderMan::trayTooltipStatusString(
QString folderMessage;
switch (syncStatus) {
case SyncResult::Undefined:
folderMessage = tr("Undefined State.");
folderMessage = tr("Undefined state.");
break;
case SyncResult::NotYetStarted:
folderMessage = tr("Waiting to start syncing.");
Expand All @@ -1513,16 +1513,16 @@ QString FolderMan::trayTooltipStatusString(
if (hasUnresolvedConflicts) {
folderMessage = tr("Sync finished with unresolved conflicts.");
} else {
folderMessage = tr("Last Sync was successful.");
folderMessage = tr("Last sync was successful.");
}
break;
case SyncResult::Error:
break;
case SyncResult::SetupError:
folderMessage = tr("Setup Error.");
folderMessage = tr("Setup error.");
break;
case SyncResult::SyncAbortRequested:
folderMessage = tr("User Abort.");
folderMessage = tr("Sync request was cancelled.");
break;
case SyncResult::Paused:
folderMessage = tr("Sync is paused.");
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MenuItem {
sourceSize.height: Style.accountAvatarStateIndicatorSize

Accessible.role: Accessible.Indicator
Accessible.name: model.desktopNotificationsAllowed ? qsTr("Current user status is online") : qsTr("Current user status is do not disturb")
Accessible.name: model.desktopNotificationsAllowed ? qsTr("Current account status is online") : qsTr("Current account status is do not disturb")
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Window {
Layout.preferredWidth: Style.accountAvatarSize

Accessible.role: Accessible.Graphic
Accessible.name: qsTr("Current user avatar")
Accessible.name: qsTr("Current account avatar")

Rectangle {
id: currentAccountStatusIndicatorBackground
Expand Down Expand Up @@ -437,7 +437,7 @@ Window {
sourceSize.height: Style.accountAvatarStateIndicatorSize

Accessible.role: Accessible.Indicator
Accessible.name: UserModel.desktopNotificationsAllowed ? qsTr("Current user status is online") : qsTr("Current user status is do not disturb")
Accessible.name: UserModel.desktopNotificationsAllowed ? qsTr("Current account status is online") : qsTr("Current account status is do not disturb")
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/gui/userstatusselectormodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,23 @@ void UserStatusSelectorModel::onError(UserStatusConnector::Error error)
return;

case UserStatusConnector::Error::CouldNotFetchUserStatus:
setError(tr("Could not fetch user status. Make sure you are connected to the server."));
setError(tr("Could not fetch status. Make sure you are connected to the server."));
return;

case UserStatusConnector::Error::UserStatusNotSupported:
setError(tr("User status feature is not supported. You will not be able to set your user status."));
setError(tr("Status feature is not supported. You will not be able to set your status."));
return;

case UserStatusConnector::Error::EmojisNotSupported:
setError(tr("Emojis feature is not supported. Some user status functionality may not work."));
setError(tr("Emojis are not supported. Some status functionality may not work."));
return;

case UserStatusConnector::Error::CouldNotSetUserStatus:
setError(tr("Could not set user status. Make sure you are connected to the server."));
setError(tr("Could not set status. Make sure you are connected to the server."));
return;

case UserStatusConnector::Error::CouldNotClearMessage:
setError(tr("Could not clear user status message. Make sure you are connected to the server."));
setError(tr("Could not clear status message. Make sure you are connected to the server."));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/wizard/owncloudadvancedsetuppage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</font>
</property>
<property name="text">
<string>User name</string>
<string>Username</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Account name

</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ bool ClientSideEncryption::newMnemonicGenerated() const
void ClientSideEncryption::decryptPrivateKey(const AccountPtr &account, const QByteArray &key) {
QString msg = tr("Please enter your end to end encryption passphrase:<br>"
"<br>"
"User: %2<br>"
"Username: %2<br>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Account name

"Account: %3<br>")
.arg(Utility::escape(account->credentials()->user()),
Utility::escape(account->displayName()));
Expand Down
12 changes: 6 additions & 6 deletions src/libsync/syncresult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ QString SyncResult::statusString() const
re = QLatin1String("Undefined");
break;
case NotYetStarted:
re = QLatin1String("Not yet Started");
re = QLatin1String("Not yet started");
break;
case SyncRunning:
re = QLatin1String("Sync Running");
re = QLatin1String("Sync running");
break;
case Success:
re = QLatin1String("Success");
Expand All @@ -51,19 +51,19 @@ QString SyncResult::statusString() const
re = QLatin1String("Error");
break;
case SetupError:
re = QLatin1String("SetupError");
re = QLatin1String("Setup error");
break;
case SyncPrepare:
re = QLatin1String("SyncPrepare");
re = QLatin1String("Preparing to sync");
break;
case Problem:
re = QLatin1String("Success, some files were ignored.");
break;
case SyncAbortRequested:
re = QLatin1String("Sync Request aborted by user");
re = QLatin1String("Sync request cancelled");
break;
case Paused:
re = QLatin1String("Sync Paused");
re = QLatin1String("Sync paused");
break;
}
return re;
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
/**
* @brief How to handle the userID
*
* @value UserIDUserName Wizard asks for user name as ID
* @value UserIDUserName Wizard asks for username as ID
* @value UserIDEmail Wizard asks for an email as ID
* @value UserIDCustom Specify string in \ref customUserID
*/
Expand Down
10 changes: 5 additions & 5 deletions test/testsetuserstatusdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ private slots:
OCC::UserStatusSelectorModel model(fakeUserStatusJob);

QCOMPARE(model.errorMessage(),
tr("Could not fetch user status. Make sure you are connected to the server."));
tr("Could not fetch status. Make sure you are connected to the server."));
}

void testError_userStatusNotSupported_emitError()
Expand All @@ -681,7 +681,7 @@ private slots:
OCC::UserStatusSelectorModel model(fakeUserStatusJob);

QCOMPARE(model.errorMessage(),
tr("User status feature is not supported. You will not be able to set your user status."));
tr("Status feature is not supported. You will not be able to set your status."));
}

void testError_couldSetUserStatus_emitError()
Expand All @@ -692,7 +692,7 @@ private slots:
model.setUserStatus();

QCOMPARE(model.errorMessage(),
tr("Could not set user status. Make sure you are connected to the server."));
tr("Could not set status. Make sure you are connected to the server."));
}

void testError_emojisNotSupported_emitError()
Expand All @@ -702,7 +702,7 @@ private slots:
OCC::UserStatusSelectorModel model(fakeUserStatusJob);

QCOMPARE(model.errorMessage(),
tr("Emojis feature is not supported. Some user status functionality may not work."));
tr("Emojis are not supported. Some status functionality may not work."));
}

void testError_couldNotClearMessage_emitError()
Expand All @@ -713,7 +713,7 @@ private slots:
model.clearUserStatus();

QCOMPARE(model.errorMessage(),
tr("Could not clear user status message. Make sure you are connected to the server."));
tr("Could not clear status message. Make sure you are connected to the server."));
}

void testError_setUserStatus_clearErrorMessage()
Expand Down