[dw-free] texttool.pl dumptext puts /foo.tt.stringname into en.dat instead of /foo.tt.text
[commit: http://hg.dwscoalition.org/dw-free/rev/4c5c7fa3f42f]
http://bugs.dwscoalition.org/show_bug.cgi?id=3632
Handle /foo.tt... strings the same way we handle /foo.bml... strings.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3632
Handle /foo.tt... strings the same way we handle /foo.bml... strings.
Patch by
Files modified:
- cgi-bin/LJ/Lang.pm
--------------------------------------------------------------------------------
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;
}
--------------------------------------------------------------------------------
