Skip to content

Commit

Permalink
Merge branch 'nextcloud:master' into feature/proposeLocalDir
Browse files Browse the repository at this point in the history
  • Loading branch information
rwalke authored Dec 4, 2024
2 parents 34b5ce8 + cea533e commit faab1c6
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 26 deletions.
3 changes: 3 additions & 0 deletions src/gui/ResolveConflictsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ ApplicationWindow {
flags: Qt.Window | Qt.Dialog
visible: true

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

width: Style.minimumWidthResolveConflictsDialog
height: Style.minimumHeightResolveConflictsDialog
minimumWidth: Style.minimumWidthResolveConflictsDialog
Expand Down
5 changes: 4 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ namespace {
" --isvfsenabled : whether to set a VFS or non-VFS folder (1 for 'yes' or 0 for 'no') when creating an account via command-line.\n"
" --remotedirpath : (optional) path to a remote subfolder when creating an account via command-line.\n"
" --serverurl : a server URL to use when creating an account via command-line.\n"
" --forcelegacyconfigimport : forcefully import account configurations from legacy clients (if available).\n";
" --forcelegacyconfigimport : forcefully import account configurations from legacy clients (if available).\n"
" --reverse : use a reverse layout direction.\n";

QString applicationTrPath()
{
Expand Down Expand Up @@ -814,6 +815,8 @@ void Application::parseOptions(const QStringList &options)
_backgroundMode = true;
} else if (option == QLatin1String("--version") || option == QLatin1String("-v")) {
_versionOnly = true;
} else if (option == QLatin1String("--reverse")) {
setLayoutDirection(layoutDirection() == Qt::LeftToRight ? Qt::RightToLeft : Qt::LeftToRight);
} else if (option.endsWith(QStringLiteral(APPLICATION_DOTVIRTUALFILE_SUFFIX))) {
// virtual file, open it after the Folder were created (if the app is not terminated)
QTimer::singleShot(0, this, [this, option] { openVirtualFile(option); });
Expand Down
3 changes: 3 additions & 0 deletions src/gui/filedetails/FileDetailsWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ApplicationWindow {
property var accountState
property string localPath: ""

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

width: 400
height: 500
minimumWidth: 300
Expand Down
3 changes: 3 additions & 0 deletions src/gui/macOS/ui/FileProviderEvictionDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ ApplicationWindow {
property var materialisedItemsModel: null
property string accountUserIdAtHost: ""

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

title: qsTr("Evict materialised files")
color: palette.base
flags: Qt.Dialog | Qt.WindowStaysOnTopHint
Expand Down
3 changes: 3 additions & 0 deletions src/gui/tray/CallNotificationDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ ApplicationWindow {
Systray.destroyDialog(root);
}

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

width: root.windowWidth
height: rootBackground.height

Expand Down
3 changes: 3 additions & 0 deletions src/gui/tray/EditFileLocallyLoadingDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ApplicationWindow {

color: palette.base

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

width: 320
height: contentLayout.implicitHeight

Expand Down
3 changes: 3 additions & 0 deletions src/gui/tray/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import com.nextcloud.desktopclient
ApplicationWindow {
id: trayWindow

LayoutMirroring.enabled: Application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

title: Systray.windowTitle
// If the main dialog is displayed as a regular window we want it to be quadratic
width: Systray.useNormalWindow ? Style.trayWindowHeight : Style.trayWindowWidth
Expand Down
12 changes: 6 additions & 6 deletions src/gui/userstatusselectormodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,25 +409,25 @@ QString UserStatusSelectorModel::timeDifferenceToString(int differenceSecs) cons
if (differenceSecs < 60) {
return tr("Less than a minute");
} else if (differenceSecs < 60 * 60) {
const auto minutesLeft = std::ceil(differenceSecs / 60.0);
const auto minutesLeft = static_cast<int>(std::ceil(differenceSecs / 60.0));
if (minutesLeft == 1) {
return tr("1 minute");
} else {
return tr("%1 minutes").arg(minutesLeft);
return tr("%1 minutes", "", minutesLeft).arg(minutesLeft);
}
} else if (differenceSecs < 60 * 60 * 24) {
const auto hoursLeft = std::ceil(differenceSecs / 60.0 / 60.0);
const auto hoursLeft = static_cast<int>(std::ceil(differenceSecs / 60.0 / 60.0));
if (hoursLeft == 1) {
return tr("1 hour");
} else {
return tr("%1 hours").arg(hoursLeft);
return tr("%1 hours", "", hoursLeft).arg(hoursLeft);
}
} else {
const auto daysLeft = std::ceil(differenceSecs / 60.0 / 60.0 / 24.0);
const auto daysLeft = static_cast<int>(std::ceil(differenceSecs / 60.0 / 60.0 / 24.0));
if (daysLeft == 1) {
return tr("1 day");
} else {
return tr("%1 days").arg(daysLeft);
return tr("%1 days", "", daysLeft).arg(daysLeft);
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions translations/client_eu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,59 +171,59 @@
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="36"/>
<source>Current account</source>
<translation type="unfinished"/>
<translation>Uneko kontua</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="42"/>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="116"/>
<source>Resume sync for all</source>
<translation type="unfinished"/>
<translation>Berrekin sinkronizazioa guztientzat</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="42"/>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="116"/>
<source>Pause sync for all</source>
<translation type="unfinished"/>
<translation>Pausatu sinkronizazioa guztientzat</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="95"/>
<source>Add account</source>
<translation type="unfinished"/>
<translation>Gehitu kontua</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="99"/>
<source>Add new account</source>
<translation type="unfinished"/>
<translation>Gehitu kontu berria</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="122"/>
<source>Settings</source>
<translation type="unfinished"/>
<translation>Ezarpenak</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="133"/>
<source>Exit</source>
<translation type="unfinished"/>
<translation>Irten</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="161"/>
<source>Current account avatar</source>
<translation type="unfinished"/>
<translation>Uneko kontuaren avatarra</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="187"/>
<source>Current account status is online</source>
<translation type="unfinished"/>
<translation>Uneko kontuaren egoera: aktibo dago</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="187"/>
<source>Current account status is do not disturb</source>
<translation type="unfinished"/>
<translation>Uneko kontuaren egoera: ez molestatu</translation>
</message>
<message>
<location filename="../src/gui/tray/CurrentAccountHeaderButton.qml" line="258"/>
<source>Account switcher and settings menu</source>
<translation type="unfinished"/>
<translation>Kontu aldatzailea eta ezarpenen menua</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -4895,17 +4895,17 @@ Modu hau berria eta experimentala da. Erabiltzea erabakitzen baduzu, agertzen di
<message>
<location filename="../src/gui/filedetails/sharemodel.cpp" line="515"/>
<source>%1 days</source>
<translation type="unfinished"/>
<translation>%1 egun</translation>
</message>
<message>
<location filename="../src/gui/filedetails/sharemodel.cpp" line="517"/>
<source>1 day</source>
<translation type="unfinished"/>
<translation>egun 1</translation>
</message>
<message>
<location filename="../src/gui/filedetails/sharemodel.cpp" line="518"/>
<source>Today</source>
<translation type="unfinished"/>
<translation>Gaur</translation>
</message>
<message>
<location filename="../src/gui/filedetails/sharemodel.cpp" line="692"/>
Expand Down Expand Up @@ -6555,17 +6555,17 @@ Zerbitzariak errorearekin erantzun du: %2</translation>
<message>
<location filename="../src/gui/tray/TrayWindowHeader.qml" line="72"/>
<source>Open local or group folders</source>
<translation type="unfinished"/>
<translation>Ireki tokiko edo taldeko karpetak</translation>
</message>
<message>
<location filename="../src/gui/tray/TrayWindowHeader.qml" line="107"/>
<source>More apps</source>
<translation type="unfinished"/>
<translation>Aplikazio gehiago</translation>
</message>
<message>
<location filename="../src/gui/tray/TrayWindowHeader.qml" line="131"/>
<source>Open %1 in browser</source>
<translation type="unfinished"/>
<translation>Ireki %1 nabigatzailean</translation>
</message>
</context>
<context>
Expand All @@ -6581,7 +6581,7 @@ Zerbitzariak errorearekin erantzun du: %2</translation>
<message>
<location filename="../src/gui/tray/UnifiedSearchPlaceholderView.qml" line="39"/>
<source>Start typing to search</source>
<translation type="unfinished"/>
<translation>Hasi idazten bilatzeko</translation>
</message>
</context>
<context>
Expand Down
2 changes: 1 addition & 1 deletion translations/client_gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2972,7 +2972,7 @@ Como alternativa, pode restaurar todos os ficheiros eliminados descargándoos do
<message>
<location filename="../src/gui/generalsettings.ui" line="301"/>
<source>S&amp;how crash reporter</source>
<translation>Amosar o informe de &amp;fallos</translation>
<translation>Amosar o informe de &amp;crebas</translation>
</message>
<message>
<location filename="../src/gui/generalsettings.ui" line="229"/>
Expand Down

0 comments on commit faab1c6

Please sign in to comment.