I18n Support (#72)

* adapt UI for i18n

* add placeWidgets() helper function to ease translation

* add hint about Transition Matrix plugin on Transition tab

* translate

* rework UI of file tab

* write status of plugin to scene info file
This commit is contained in:
shugen002
2020-12-21 18:24:04 +08:00
committed by GitHub
parent 07b95cb8ae
commit 8ba78b12c1
32 changed files with 1340 additions and 873 deletions

View File

@@ -143,10 +143,6 @@ RandomSwitchWidget::RandomSwitchWidget(RandomSwitch *s) : SwitchWidget(s, false)
{
delay = new QDoubleSpinBox();
switchLabel = new QLabel("If no switch condition is met switch to ");
usingLabel = new QLabel("using");
forLabel = new QLabel("for");
QWidget::connect(delay, SIGNAL(valueChanged(double)), this,
SLOT(DelayChanged(double)));
@@ -160,15 +156,12 @@ RandomSwitchWidget::RandomSwitchWidget(RandomSwitch *s) : SwitchWidget(s, false)
setStyleSheet("* { background-color: transparent; }");
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->addWidget(switchLabel);
mainLayout->addWidget(scenes);
mainLayout->addWidget(usingLabel);
mainLayout->addWidget(transitions);
mainLayout->addWidget(forLabel);
mainLayout->addWidget(delay);
mainLayout->addStretch();
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
{"{{scenes}}", scenes},
{"{{transitions}}", transitions},
{"{{delay}}", delay}};
placeWidgets(obs_module_text("AdvSceneSwitcher.randomTab.entry"),
mainLayout, widgetPlaceholders);
setLayout(mainLayout);
switchData = s;