[PATCH] More strings to translate

Dirk Hohndel dirk at hohndel.org
Tue Jul 29 08:52:14 PDT 2014


On Mon, Jul 28, 2014 at 06:12:51PM +0400, Sergey Starosek wrote:
> Signed-off-by: Sergey Starosek <sergey.starosek at gmail.com>
> ---
>  qt-ui/profile/profilewidget2.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
> index e683b67..3bb5952 100644
> --- a/qt-ui/profile/profilewidget2.cpp
> +++ b/qt-ui/profile/profilewidget2.cpp
> @@ -1023,7 +1023,7 @@ void ProfileWidget2::addBookmark()
>  {
>  	QAction *action = qobject_cast<QAction *>(sender());
>  	QPointF scenePos = mapToScene(mapFromGlobal(action->data().toPoint()));
> -	add_event(current_dc, timeAxis->valueAt(scenePos), SAMPLE_EVENT_BOOKMARK, 0, 0, "bookmark");
> +	add_event(current_dc, timeAxis->valueAt(scenePos), SAMPLE_EVENT_BOOKMARK, 0, 0, tr("bookmark"));

No, this is wrong. event texts are translated when they are displayed, but
standard names like "bookmark" are not translated in the structure.

To make matters worse - this doesn't even compile. tr returns a QString,
add_event() expects a const char *

>  	mark_divelist_changed(true);
>  	replot();
>  }
> @@ -1085,7 +1085,7 @@ void ProfileWidget2::editName()
>  	if (ok && !newName.isEmpty()) {
>  		if (newName.length() > 22) { //longer names will display as garbage.
>  			QMessageBox lengthWarning;
> -			lengthWarning.setText("Name is too long!");
> +			lengthWarning.setText(tr("Name is too long!"));

Yep, that one's correct.

Can you send an updated commit?

/D


More information about the subsurface mailing list