language codes are lowercase
authorVolker Birk <vb@pep-project.org>
Sun, 21 Feb 2016 22:58:14 +0100
changeset 461262ffb42e277
parent 460 1a83b8144619
child 462 4e73adab046a
language codes are lowercase
src/pEpEngine.c
test/i18n_test.cc
     1.1 --- a/src/pEpEngine.c	Sun Feb 21 22:48:35 2016 +0100
     1.2 +++ b/src/pEpEngine.c	Sun Feb 21 22:58:14 2016 +0100
     1.3 @@ -215,7 +215,7 @@
     1.4  
     1.5          sql_languagelist = "select lang, name from i18n_language order by lang ;";
     1.6  
     1.7 -        sql_i18n_token = "select phrase from i18n_token where lang = ?1 and id = ?2 ;";
     1.8 +        sql_i18n_token = "select phrase from i18n_token where lang = lower(?1) and id = ?2 ;";
     1.9      }
    1.10  
    1.11      int_result = sqlite3_prepare_v2(_session->db, sql_log, (int)strlen(sql_log),
     2.1 --- a/test/i18n_test.cc	Sun Feb 21 22:48:35 2016 +0100
     2.2 +++ b/test/i18n_test.cc	Sun Feb 21 22:58:14 2016 +0100
     2.3 @@ -34,6 +34,10 @@
     2.4      cout << "\nGerman: " << phrase << "\n";
     2.5      pEp_free(phrase);
     2.6  
     2.7 +    status3 = get_phrase(session, "zz", 1, &phrase);
     2.8 +    assert(status3 == PEP_PHRASE_NOT_FOUND);
     2.9 +    assert(phrase == NULL);
    2.10 +
    2.11      cout << "calling release()\n";
    2.12      release(session);
    2.13      return 0;