forked from Shinonome/dots-hyprland
i18n: Refactor string formatting to use arg() method for translations
This commit is contained in:
@@ -124,7 +124,7 @@ Scope {
|
||||
StyledText {
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer0
|
||||
text: StringUtils.format(Translation.tr("Uptime: {0}"), DateTime.uptime)
|
||||
text: Translation.tr("Uptime: %1").arg(DateTime.uptime)
|
||||
textFormat: Text.MarkdownText
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ QuickToggleButton {
|
||||
}
|
||||
}
|
||||
StyledToolTip {
|
||||
content: StringUtils.format(Translation.tr("{0} | Right-click to configure"),
|
||||
content: Translation.tr("%1 | Right-click to configure").arg(
|
||||
(Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ?
|
||||
Bluetooth.bluetoothDeviceName : Translation.tr("Bluetooth"))
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@ QuickToggleButton {
|
||||
}
|
||||
}
|
||||
StyledToolTip {
|
||||
content: StringUtils.format(Translation.tr("{0} | Right-click to configure"), Network.networkName)
|
||||
content: Translation.tr("%1 | Right-click to configure").arg(Network.networkName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user