Browse Source

UI: Localize font picker window title

gxalpha 2 years ago
parent
commit
f7d5d80b04
3 changed files with 13 additions and 6 deletions
  1. 4 2
      UI/context-bar-controls.cpp
  2. 1 0
      UI/data/locale/en-US.ini
  3. 8 4
      UI/properties-view.cpp

+ 4 - 2
UI/context-bar-controls.cpp

@@ -654,8 +654,10 @@ void TextSourceToolbar::on_selectFont_clicked()
 	options = QFontDialog::DontUseNativeDialog;
 #endif
 
-	font = QFontDialog::getFont(&success, font, this, "Pick a Font",
-				    options);
+	font = QFontDialog::getFont(
+		&success, font, this,
+		QTStr("Basic.PropertiesWindow.SelectFont.WindowTitle"),
+		options);
 	if (!success) {
 		return;
 	}

+ 1 - 0
UI/data/locale/en-US.ini

@@ -612,6 +612,7 @@ Basic.PropertiesWindow="Properties for '%1'"
 Basic.PropertiesWindow.AutoSelectFormat="%1 (autoselect: %2)"
 Basic.PropertiesWindow.SelectColor="Select color"
 Basic.PropertiesWindow.SelectFont="Select font"
+Basic.PropertiesWindow.SelectFont.WindowTitle="Pick a Font"
 Basic.PropertiesWindow.ConfirmTitle="Settings Changed"
 Basic.PropertiesWindow.Confirm="There are unsaved changes. Do you want to keep them?"
 Basic.PropertiesWindow.NoProperties="No properties available"

+ 8 - 4
UI/properties-view.cpp

@@ -1953,12 +1953,16 @@ bool WidgetInfo::FontChanged(const char *setting)
 
 	if (!font_obj) {
 		QFont initial;
-		font = QFontDialog::getFont(&success, initial, view,
-					    "Pick a Font", options);
+		font = QFontDialog::getFont(
+			&success, initial, view,
+			QTStr("Basic.PropertiesWindow.SelectFont.WindowTitle"),
+			options);
 	} else {
 		MakeQFont(font_obj, font);
-		font = QFontDialog::getFont(&success, font, view, "Pick a Font",
-					    options);
+		font = QFontDialog::getFont(
+			&success, font, view,
+			QTStr("Basic.PropertiesWindow.SelectFont.WindowTitle"),
+			options);
 	}
 
 	if (!success)