Handle /foo.tt... strings the same way we handle /foo.bml... strings.

        Patch by fu. 

diffs (33 lines):

diff -r 209aafb7897b -r 4c5c7fa3f42f cgi-bin/LJ/Lang.pm
--- a/cgi-bin/LJ/Lang.pm        Wed Apr 20 12:45:57 2011 +0800
+++ b/cgi-bin/LJ/Lang.pm        Wed Apr 20 21:16:27 2011 +0800
@@ -266,6 +266,14 @@ sub relative_langdat_file_of_lang_itcode
         return $langdat_file;
     }
 
+    if ( $itcode =~ m!^(/.+\.tt)! ) {
+        my $file = $1;
+
+        my $langdat_file = "views$file\.text";
+        $langdat_file .= $is_local ? ".local" : "";
+        return $langdat_file;
+    }
+
     # not a bml file, goes into base .dat file
     return $base_file;
 }
@@ -274,12 +282,12 @@ sub itcode_for_langdat_file {
     my ($langdat_file, $itcode) = @_;
 
     # non-bml itcode, return full itcode path
-    unless ($langdat_file =~ m!^/.+\.bml\.text(?:\.local)?$!) {
+    unless ($langdat_file =~ m!^/.+\.(?:bml|tt)\.text(?:\.local)?$!) {
         return $itcode;
     }
 
     # bml itcode, strip filename and return
-    if ($itcode =~ m!^/.+\.bml(\..+)!) {
+    if ($itcode =~ m!^/.+\.(?:bml|tt)(\..+)!) {
         return $1;
     }
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to