2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Use tr:: instead of langFactory in input fields.

This commit is contained in:
John Preston
2019-06-18 16:07:45 +02:00
parent 7af0dd105e
commit 8ed433cc01
55 changed files with 299 additions and 222 deletions

View File

@@ -186,7 +186,7 @@ Options::Option Options::Option::Create(
container,
st::createPollOptionField,
Ui::InputField::Mode::NoNewlines,
langFactory(lng_polls_create_option_add))));
tr::lng_polls_create_option_add())));
InitField(outer, field->entity());
field->entity()->setMaxLength(kOptionLimit + kErrorLimit);
result._field.reset(field);
@@ -311,7 +311,7 @@ void Options::Option::clearValue() {
}
void Options::Option::setPlaceholder() const {
field()->setPlaceholder(langFactory(lng_polls_create_option_add));
field()->setPlaceholder(tr::lng_polls_create_option_add());
}
void Options::Option::toggleRemoveAlways(bool toggled) {
@@ -323,7 +323,7 @@ not_null<Ui::InputField*> Options::Option::field() const {
}
void Options::Option::removePlaceholder() const {
field()->setPlaceholder(nullptr);
field()->setPlaceholder(rpl::single(QString()));
}
PollAnswer Options::Option::toPollAnswer(int index) const {
@@ -603,7 +603,7 @@ not_null<Ui::InputField*> CreatePollBox::setupQuestion(
container,
st::createPollField,
Ui::InputField::Mode::MultiLine,
langFactory(lng_polls_create_question_placeholder)),
tr::lng_polls_create_question_placeholder()),
st::createPollFieldPadding);
InitField(getDelegate()->outerContainer(), question);
question->setMaxLength(kQuestionLimit + kErrorLimit);