Changeset 12a59ef in subsurface


Ignore:
Timestamp:
Apr 26, 2017, 5:34:40 AM (5 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
63be0af
Parents:
dc9cf7b
git-author:
Jan Mulder <jlmulder@…> (04/25/17 14:16:46)
git-committer:
Dirk Hohndel <dirk@…> (04/26/17 05:34:40)
Message:

Correct divesite geocoding translation

See https://github.com/Subsurface-divelog/subsurface/issues/345. The
menues where not translated. The basis of this error is a simple
typo in core/taxonomy.c where the classname was mis-spelled in the
QT_TRANSLATE_NOOP. In addition, to pull and translate the strings
from C code, the normal tr() does not work, and the functionality
from the gettextfromc class is used.

Fixes: #345

Signed-off-by: Jan Mulder <jlmulder@…>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/taxonomy.c

    r7be962b r12a59ef  
    44
    55char *taxonomy_category_names[TC_NR_CATEGORIES] = {
    6         QT_TRANSLATE_NOOP("getTextFromC", "None"),
    7         QT_TRANSLATE_NOOP("getTextFromC", "Ocean"),
    8         QT_TRANSLATE_NOOP("getTextFromC", "Country"),
    9         QT_TRANSLATE_NOOP("getTextFromC", "State"),
    10         QT_TRANSLATE_NOOP("getTextFromC", "County"),
    11         QT_TRANSLATE_NOOP("getTextFromC", "Town"),
    12         QT_TRANSLATE_NOOP("getTextFromC", "City")
     6        QT_TRANSLATE_NOOP("gettextFromC", "None"),
     7        QT_TRANSLATE_NOOP("gettextFromC", "Ocean"),
     8        QT_TRANSLATE_NOOP("gettextFromC", "Country"),
     9        QT_TRANSLATE_NOOP("gettextFromC", "State"),
     10        QT_TRANSLATE_NOOP("gettextFromC", "County"),
     11        QT_TRANSLATE_NOOP("gettextFromC", "Town"),
     12        QT_TRANSLATE_NOOP("gettextFromC", "City")
    1313};
    1414
  • qt-models/divelocationmodel.cpp

    r7be962b r12a59ef  
    55#include <QLineEdit>
    66#include <QIcon>
     7#include <core/gettextfromc.h>
    78
    89bool dive_site_less_than(dive_site *a, dive_site *b)
     
    185186        int i;
    186187        for (i = 0; i < TC_NR_CATEGORIES; i++)
    187                 list << taxonomy_category_names[i];
     188                list << gettextFromC::instance()->trGettext(taxonomy_category_names[i]);
    188189        setStringList(list);
    189190}
Note: See TracChangeset for help on using the changeset viewer.