summaryrefslogtreecommitdiff
path: root/rt/docs/design_docs/string-extraction-guide.txt
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2006-01-05 09:34:30 +0000
committercvs2git <cvs2git>2006-01-05 09:34:30 +0000
commit0c525f3ba7b2b6730b8939b950e4d76dd16802a9 (patch)
tree9d0c5411f52238759ca3484d5ecc036dc6905414 /rt/docs/design_docs/string-extraction-guide.txt
parent8f5c91d6c7a8dc85a8b6768a149b4c7b3e144c38 (diff)
This commit was manufactured by cvs2svn to create tag 'SQL_LEDGER_2_4_4'.SQL_LEDGER_2_4_4
Diffstat (limited to 'rt/docs/design_docs/string-extraction-guide.txt')
-rw-r--r--rt/docs/design_docs/string-extraction-guide.txt100
1 files changed, 0 insertions, 100 deletions
diff --git a/rt/docs/design_docs/string-extraction-guide.txt b/rt/docs/design_docs/string-extraction-guide.txt
deleted file mode 100644
index bd60a43fa..000000000
--- a/rt/docs/design_docs/string-extraction-guide.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-# $File: //depot/RT/rt-devel/docs/design_docs/string-extraction-guide.txt $ $Author: ivan $
-# $Revision: 1.1 $ $Change: 1431 $ $DateTime: 2002/10/15 17:24:45 $
-
-Run 'p4 edit lib/RT/I18N/zh_tw.pm' and 'perl l10n.pl' to add new
-extractions to the zh_tw.pm.
-
-Edit lib/RT/I18N/zh_tw.pm for chinese counterparts.
-
-Attached is a copy of the freshly rewritten string extraction style guide.
-Please point out anything that's unclear or underspecified. I
-localized a number of the core modules in RT 2.1.3 (Starting with
-Queue_Overlay.pm). I only touched a couple of the web templates in the
-Elements/ directory of the web ui.
-
-RT String extraction styleguide:
-
-Web templates:
-
-Templates should use the /l filtering component to call the localisation
-framework
-
-The string Foo!
-
-Should become <&|/l&>Foo!</&>
-
-All newlines should be removed from localized strings, to make it easy to
-grep the codebase for strings to be localized
-
-The string Foo
- Bar
- Baz
-
-Should become <&|/l&>Foo Bar Baz</&>
-
-
-Variable subsititutions should be moved to Locale::MakeText format
-
-The string Hello, <%$name %>
-
-should become <&|/l, $name &>Hello, [_1]</&>
-
-
-Multiple variables work just like single variables
-
-The string You found <%$num%> tickets in queue <%$queue%>
-
-should become <&|/l, $num, $queue &>You found [_1] tickets in queue [_2]</&>
-
-When subcomponents are called in the middle of a phrase, they need to be escaped
-too:
-
-The string <input type="submit" value="New ticket in">&nbsp<& /Elements/SelectNewTicketQueue&>
-
-should become <&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
-
-
-
-There are places inside the web ui where strings are defined, which need to be
-localised. it is important to note here that each localized string is split out
-onto its own line, but never split across two lines and two localized strings
-are never included on the same line. It is also important to note
-that this will genereate code which will not work in RT 2.1.3. I need
-to add a bit of framework to make it work in 2.1.4
-
-
-The string <& /Elements/TitleBoxStart, width=> "40%", titleright => "RT $RT::VERSION for $RT::rtname", title => 'Login' &>
-
-should become <& /Elements/TitleBoxStart,
- width=> "40%",
- titleright => loc("RT [_1] for [_2]",$RT::VERSION, $RT::rtname),
- title => loc('Login'),
- &>
-
-
-
-
-
-
-Within RT's core code, every module has a localization handle available through the 'loc' method:
-
-The code return ( $id, "Queue created" );
-
-should become return ( $id, $self->loc("Queue created") );
-
-When returning or localizing a single string, the "extra" set of parenthesis () should be omitted.
-
-The code return ("Subject changed to ". $self->Data );
-
-should become return $self->loc( "Subject changed to [_1]", $self->Data );
-
-
-It is important not to localize the names of rights or statuses within RT's core, as there is logic that depends on them as string identifiers. The proper place to localize these values is when they're presented for display in the web or commandline interfaces.
-
-
-
-
-
---
-http://www.bestpractical.com/products/rt -- Trouble Ticketing. Free.
-