Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl,v diff -u -N -r1.4.2.4 -r1.4.2.5 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 28 Aug 2020 12:17:20 -0000 1.4.2.4 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 28 Aug 2020 12:23:27 -0000 1.4.2.5 @@ -169,36 +169,41 @@ aa_run_with_teardown -rollback -test_code { set package_key acs-translations set message_key [ad_generate_random_string] - set text [ad_generate_random_string] + set it_text [ad_generate_random_string] aa_log "Registering new #${package_key}.$message_key# in it_IT first" lang::util::convert_to_i18n \ -locale it_IT \ -package_key $package_key \ -message_key $message_key \ - -text $text + -text $it_text - aa_true "Fallback en_US message was registered for #${package_key}.$message_key#" [db_string check { + aa_true "#${package_key}.$message_key#: fallback en_US message was registered" [db_string check { select exists (select 1 from lang_messages where package_key = :package_key and message_key = :message_key and locale = 'en_US' - and message = :text) + and message = :it_text) from dual }] - aa_log "Update the en_US message for #${package_key}.$message_key#" + aa_log "#${package_key}.$message_key#: en_US message" set en_text [ad_generate_random_string] lang::util::convert_to_i18n \ -locale en_US \ -package_key $package_key \ -message_key $message_key \ -text $en_text - aa_true "Fallback en_US message was updated for #${package_key}.$message_key#" [db_string check { + aa_true "#${package_key}.$message_key#: en_US message was updated, while it_IT message was not affected" [db_string check { select exists (select 1 from lang_messages where package_key = :package_key and message_key = :message_key and locale = 'en_US' - and message = :en_text) + and message = :en_text) and + exists (select 1 from lang_messages + where package_key = :package_key + and message_key = :message_key + and locale = 'it_IT' + and message = :it_text) from dual }] @@ -209,7 +214,7 @@ -package_key $package_key \ -message_key $message_key \ -text $it_text - aa_true "Fallback it_IT message was updated, while en_US message was unaffected #${package_key}.$message_key#" [db_string check { + aa_true "#${package_key}.$message_key#: it_IT message was updated, while en_US message was not affected" [db_string check { select exists (select 1 from lang_messages where package_key = :package_key and message_key = :message_key