[gnome-i18n] en_GB: Don't match suffixes in en_GB.pl



commit 6e348557bde30f2a6d300a8b90e00ba1a5a300fe
Author: Philip Withnall <bugzilla tecnocode co uk>
Date:   Sat Apr 4 23:55:00 2009 +0000

    en_GB: Don't match suffixes in en_GB.pl
    
    This fixes the bug, by checking for word boundaries after words to be
    translated. This means that suffixes (even the common ones like "s" for
    plurals) are never matched. This will require a lot more translations
    to be added to the dictionary, but is probably the safest route to take.
    
    If we wanted to cut down on the number of translations added, we could
    check for word boundaries, or "s\b", or "es\b" after words to be translated,
    to allow for plurals. However, we would have to go through the dictionary
    and ensure this was OK for all words, and add exceptions for those words
    for which it doesn't make sense. There aren't likely to be any, though.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=574576

 en_GB/en_GB.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/en_GB/en_GB.pl b/en_GB/en_GB.pl
index 996822c1..85d111b1 100755
--- a/en_GB/en_GB.pl
+++ b/en_GB/en_GB.pl
@@ -121,11 +121,11 @@ sub do_trans {
       }
   }
 
-  $msg_str =~ s/(\b|_)\u$underscores_tf/$upper_tt/g and return
+  $msg_str =~ s/(\b|_)\u$underscores_tf\b/$upper_tt/g and return
       if defined $upper_tt;
-  $msg_str =~ s/(\b|_)$underscores_tf/$tt/g;
-  $msg_str =~ s/(\b|_)\u$underscores_tf/\u$tt/g;
-  $msg_str =~ s/(\b|_)\U$underscores_tf/\U$tt/g;
+  $msg_str =~ s/(\b|_)$underscores_tf\b/$tt/g;
+  $msg_str =~ s/(\b|_)\u$underscores_tf\b/\u$tt/g;
+  $msg_str =~ s/(\b|_)\U$underscores_tf\b/\U$tt/g;
 }
 
 sub query_trans {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]