From 4e3668464b1e0cb4fa00d5543ef071c16af0f011 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Mon, 28 Nov 2011 12:13:42 +0100 Subject: [PATCH] fixing the translatable-template.t to handle localized setups Depending on your locale, msgmerge will return a different messages, enclosed in .... and . The flow is not utf8 compliant, so this patch switches to testing "..... anything." instead of ".... word." Now the test work on my (french setup) (cherry picked from commit c95cbce4ce8df9d9d8f664b84a3d15a6e8e8cc57) Signed-off-by: Chris Nighswonger --- xt/author/translatable-templates.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xt/author/translatable-templates.t b/xt/author/translatable-templates.t index 0c2e4778c5..8079cd610f 100644 --- a/xt/author/translatable-templates.t +++ b/xt/author/translatable-templates.t @@ -38,8 +38,11 @@ sub test_string_extraction { my @warnings; while () { # ignore some noise on STDERR - next if /^\.* done\.$/; - next if /^\.* terminé\.$/; + # the output of msmerge, that consist in .... followed by a "done" (localized), followed by a . + # The "done" localized can include diacritics, so ignoring the whole word + # FIXME PP: the flow is not correct UTF8, testing \p{IsLetter} does not work, but I think this regexp will do the job + next if (/^\.+ .*\.$/); + # other Koha-specific catses that should not worry us next if /^Warning: Can't determine original templates' charset/; next if /^Warning: Charset Out defaulting to/; next if /^Removing empty file /; -- 2.39.5