Two macros are enough for a very powerful general mechanism of separation of minimal translatable text from meta-structures that don’t interst translators. Others are more narrowly tailored to internals work at a2e. |
||
1 Future2 To Do
3 Macros of the a2e.rb packages3.1 MultilinguisationSome usage examples: {vok:{ml:From the above results it has been recognised that the %1 strand is propagated in %(2|mammal-originating strandified cells), and it is believed that these are equivalent to the %4 strands found in the commercially available %3.}|B1(G)|pe:{ml:Vero, MDBK and BHK21}|{ml:NB vaccine}|B1(K)} Two macros are enough for a very powerful mechanism of separation of minimal translatable text from meta-structures that don’t interst translators:
By applying the abstractions to the above sentence, it becomes easier to reuse once-translated sentence templates, and these templates themselves are often easier to oversee than the completely expanded structures. 3.1.1 Advanced usage of ml and vok (not all implemented)3.1.1.1 Enumerations, with special meaning of %9 as last argument{ml id=etlist ja="%1と%2と%9":%1, %2 and %9} {vok:etlist|{ml ja=兎:rabbit}|{ml ja=馬:horse}|{ml ja=牛:cow}|{ml ja=狐:fox}} ==> rabbit, horse, cow and fox _EOD_ **** Definitions of derived placeholders that are made available to translators #Verbatim wrap=50 <<__END_HEISEI_ {ml id=heisei Y=%(add,1988,%1) M=%(numpad,2,%2) MN=%(month_name,%3 D=numpad,2,%3) ja="平成%1年%2月%3日":%MN %D, %Y} _END_HEISEI_ **** Function and variable Placeholders, another example #Verbatim wrap=50 <<_END_FIRMNORM_ {vok:{ml id=firmnorm ja="%1の%(2:%3規格)":%(2:%3 standard) of %1}|{vok:tp|{vok:{ml id=landfirm ja="%1%2":%2 of %1}|{ml ja="メキシコ":Mexico}|{vok:{ml id=firm ja="%1社":%1 Inc}|ALPES}}|{vok:firm|{ml id=chariver ja="チャールスリバー":Charles River}}}|link:http://www.alpes.com/standards/spf|SPF} _END_FIRMNORM_ *** dynamic links Instead of pointing to a URL literally, we point to the identifier of a document (dok). The URL is looked up and substituted by the software. The following two might lead to the same result #Verbatim <<_EOT_ We use {ah url="http://a2e.de/adv/deplate":Deplate}. We use {ah dok=deplate:Deplate}. _EOT_ ** Database Input We've developped a generic way of silently embedding database input in what appears to be normal text. See {ah dok=deplate_dbtab0802} for more explanations. * Resources #ah - {ah url=a2e.rb:a2e extension module} - this links deplate to the a2e database and adds some macros that are useful for separating translatable text from the document and allowing its extraction to translator-editable files - {ah dok=tratext:Tratext tools} -- these also parse deplate and specifically the macros defined in the a2e.rb module - {ah dok=a2e_ruby} - {ah dok=mktdir} * Past #ev_int - 2008-02-17 switching between multiple databases by means of the dbnom variable now supported - {ev id=deplate_modd070816 dat=2007-08-16 typ=d prs=phm:PILCH Hartmut creates this directory} |