Skip to content

Commit

Permalink
fixed translation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolcha committed Aug 30, 2024
1 parent 1979012 commit 719bbe2
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Network Svg
OPTIONAL_COMPONENTS Multimedia)
find_package(Qt6 6.7 REQUIRED COMPONENTS LinguistTools)

qt_standard_project_setup(I18N_TRANSLATED_LANGUAGES en ru zh_CN)
qt_standard_project_setup(I18N_TRANSLATED_LANGUAGES en ru_RU zh_CN)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
include(clock_utils)
Expand Down
7 changes: 2 additions & 5 deletions app/gui/settings_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
<item row="0" column="1">
<widget class="QToolButton" name="tx_btn">
<property name="text">
<string>...</string>
<string notr="true">...</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -541,9 +541,6 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="2">
<widget class="QSpinBox" name="scaling_edit">
<property name="toolTip">
<string>horizontal scaling</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
</property>
Expand Down Expand Up @@ -715,7 +712,7 @@
<item row="0" column="1">
<widget class="QToolButton" name="bg_btn">
<property name="text">
<string>...</string>
<string notr="true">...</string>
</property>
</widget>
</item>
Expand Down
53 changes: 53 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"project_id": "712223"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "."
"base_url": "https://api.crowdin.com"

"preserve_hierarchy": true

files: [
{
"source": "app/i18n/digital_clock_en.ts",
"translation": "app/i18n/digital_clock_%locale_with_underscore%.ts",
},
{
"source": "plugin_core/i18n/plugin_core_en.ts",
"translation": "plugin_core/i18n/plugin_core_%locale_with_underscore%.ts",
},
{
"source": "plugins/any_zoom/i18n/any_zoom_en.ts",
"translation": "plugins/any_zoom/i18n/any_zoom_%locale_with_underscore%.ts",
},
{
"source": "plugins/chime/i18n/chime_en.ts",
"translation": "plugins/chime/i18n/chime_%locale_with_underscore%.ts",
},
{
"source": "plugins/countdown_timer/i18n/countdown_timer_en.ts",
"translation": "plugins/countdown_timer/i18n/countdown_timer_%locale_with_underscore%.ts",
},
{
"source": "plugins/date/i18n/date_en.ts",
"translation": "plugins/date/i18n/date_%locale_with_underscore%.ts",
},
{
"source": "plugins/quick_note/i18n/quick_note_en.ts",
"translation": "plugins/quick_note/i18n/quick_note_%locale_with_underscore%.ts",
},
{
"source": "plugins/random_position/i18n/random_position_en.ts",
"translation": "plugins/random_position/i18n/random_position_%locale_with_underscore%.ts",
},
{
"source": "plugins/spectrum_clock/i18n/spectrum_clock_en.ts",
"translation": "plugins/spectrum_clock/i18n/spectrum_clock_%locale_with_underscore%.ts",
},
{
"source": "plugins/stopwatch/i18n/stopwatch_en.ts",
"translation": "plugins/stopwatch/i18n/stopwatch_%locale_with_underscore%.ts",
},
{
"source": "plugins/var_translucency/i18n/var_translucency_en.ts",
"translation": "plugins/var_translucency/i18n/var_translucency_%locale_with_underscore%.ts",
},
]
12 changes: 6 additions & 6 deletions plugin_core/impl/appearance_settings_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ AppearanceSettingsWidget::AppearanceSettingsWidget(
QSignalBlocker ah(ui->align_h_box);
QSignalBlocker av(ui->align_v_box);

ui->align_h_box->addItem(tr("left"), Qt::AlignLeft);
ui->align_h_box->addItem(tr("center"), Qt::AlignHCenter);
ui->align_h_box->addItem(tr("right"), Qt::AlignRight);
ui->align_h_box->addItem(tr("left", "alignment"), Qt::AlignLeft);
ui->align_h_box->addItem(tr("center", "alignment"), Qt::AlignHCenter);
ui->align_h_box->addItem(tr("right", "alignment"), Qt::AlignRight);

ui->align_v_box->addItem(tr("top"), Qt::AlignTop);
ui->align_v_box->addItem(tr("center"), Qt::AlignVCenter);
ui->align_v_box->addItem(tr("bottom"), Qt::AlignBottom);
ui->align_v_box->addItem(tr("top", "alignment"), Qt::AlignTop);
ui->align_v_box->addItem(tr("center", "alignment"), Qt::AlignVCenter);
ui->align_v_box->addItem(tr("bottom", "alignment"), Qt::AlignBottom);

int hidx = -1;
auto halign = cfg.getAlignment() & Qt::AlignHorizontal_Mask;
Expand Down
10 changes: 8 additions & 2 deletions plugin_core/impl/appearance_settings_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<height>329</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Appearance</string>
</property>
Expand Down Expand Up @@ -171,7 +177,7 @@
<item row="0" column="1">
<widget class="QToolButton" name="tx_btn">
<property name="text">
<string>...</string>
<string notr="true">...</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -249,7 +255,7 @@
<item row="0" column="1">
<widget class="QToolButton" name="bg_btn">
<property name="text">
<string>...</string>
<string notr="true">...</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion plugins/spectrum_clock/spectrum_clock_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SpectrumClockPluginFactory : public ClockPluginFactory
public:
std::unique_ptr<ClockPluginBase> create() const override;

QString title() const override { return tr("\"Spectrum clock\""); }
QString title() const override { return QString("\"Spectrum clock\""); }
QString description() const override;

bool perClockInstance() const override { return true; }
Expand Down
2 changes: 1 addition & 1 deletion plugins/var_translucency/var_translucency_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ std::unique_ptr<ClockPluginBase> VarTranslucencyPluginFactory::create() const

QString VarTranslucencyPluginFactory::description() const
{
return tr("Randomly changes clock position during time.");
return tr("Changes clock opacity level during time.");
}

0 comments on commit 719bbe2

Please sign in to comment.