Mercurial > octave-libtiff
changeset 22399:f0836b5ec628
Allow translation of all the annotation dialog strings (bug #48940)
* annotation-dialog.cc (annotation_dialog::get_gui_props): return the actual
english version of the combo box text.
* annotation-dialog.cc (annotation_dialog::get_gui_props): wrap code to 80 col.
* fr_FR.ts: translate combo box strings
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 29 Aug 2016 11:25:12 +0200 |
parents | 1442ae783e1f |
children | 27858292a5ee |
files | libgui/graphics/annotation-dialog.cc libgui/languages/fr_FR.ts |
diffstat | 2 files changed, 36 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/annotation-dialog.cc Sun Aug 28 10:39:28 2016 -0400 +++ b/libgui/graphics/annotation-dialog.cc Mon Aug 29 11:25:12 2016 +0200 @@ -130,16 +130,36 @@ props.append (ovl ("textbox", position)); props.append (ovl ("string", ui->edit_string->text ().toStdString ())); - props.append (ovl ("fitboxtotext", ui->cb_fit_box_to_text->isChecked() ? "on" : "off" )); - props.append (ovl ("units", ui->cb_units->currentText ().toStdString () )); - props.append (ovl ("horizontalalignment", ui->cb_horz_align->currentText ().toStdString () )); - props.append (ovl ("verticalalignment", ui->cb_vert_align->currentText ().toStdString () )); - props.append (ovl ("fontname", ui->cb_font_name->currentText ().toStdString())); + props.append (ovl ("fitboxtotext", ui->cb_fit_box_to_text->isChecked() ? + "on" : "off" )); + + // FIXME: only "normalized" units is selectable, change the code bellow + // once more units are added in the UI. + std::string tmpval; + props.append (ovl ("units", "normalized")); + + tmpval = (ui->cb_horz_align->currentIndex () == 0 ? "left" : + (ui->cb_horz_align->currentIndex () == 1 ? "center" : "right")); + props.append (ovl ("horizontalalignment", tmpval)); + + tmpval = (ui->cb_vert_align->currentIndex () == 0 ? "top" : + (ui->cb_horz_align->currentIndex () == 1 ? "middle" : "bottom")); + props.append (ovl ("verticalalignment", tmpval)); + + tmpval = ui->cb_font_name->currentText ().toStdString(); + props.append (ovl ("fontname", tmpval)); + props.append (ovl ("fontsize", ui->sb_font_size->value ())); - props.append (ovl ("fontweight", ui->cb_font_bold->isChecked() ? "bold" : "normal" )); - props.append (ovl ("fontangle", ui->cb_font_italic->isChecked() ? "italic" : "normal" )); - props.append (ovl ("color", Utils::toRgb (ui->btn_color->palette ().color (QPalette::Button)))); - props.append (ovl ("linestyle", ui->cb_line_style->currentText ().toStdString ())); + props.append (ovl ("fontweight", ui->cb_font_bold->isChecked() ? + "bold" : "normal" )); + props.append (ovl ("fontangle", ui->cb_font_italic->isChecked() ? + "italic" : "normal" )); + props.append (ovl ("color", Utils::toRgb (ui->btn_color->palette (). + color (QPalette::Button)))); + + // FIXME: only "none" linestyle is selectable, change the code bellow + // once more linestyles are added in the UI. + props.append (ovl ("linestyle", "none")); } void
--- a/libgui/languages/fr_FR.ts Sun Aug 28 10:39:28 2016 -0400 +++ b/libgui/languages/fr_FR.ts Mon Aug 29 11:25:12 2016 +0200 @@ -286,21 +286,18 @@ <message> <location line="+11"/> <source>left</source> - <translatorcomment>Do not translate!</translatorcomment> - <translation>left</translation> + <translation>gauche</translation> </message> <message> <location line="+5"/> <location line="+29"/> <source>middle</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>middle</translation> + <translation>milieu</translation> </message> <message> <location line="-24"/> <source>right</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>right</translation> + <translation>droite</translation> </message> <message> <location line="+8"/> @@ -310,14 +307,12 @@ <message> <location line="+11"/> <source>top</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>top</translation> + <translation>haut</translation> </message> <message> <location line="+10"/> <source>bottom</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>bottom</translation> + <translation>bas</translation> </message> <message> <location line="+11"/> @@ -352,8 +347,7 @@ <message> <location line="+11"/> <source>normalized</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>normalized</translation> + <translation>normalisée</translation> </message> <message> <location line="+8"/> @@ -383,8 +377,7 @@ <message> <location line="+11"/> <source>none</source> - <translatorcomment>Do not translate</translatorcomment> - <translation>none</translation> + <translation>aucune</translation> </message> <message> <location line="+8"/>