Roxen.git/
server/
modules/
tags/
translation_mod.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2000-07-13
2000-07-13 13:58:20 by Martin Nilsson <mani@lysator.liu.se>
2de57bfa6af5f0bbfe33ed24d86edcdf17232602 (
15
lines) (+
9
/-
6
)
[
Show
|
Annotate
]
Branch:
5.2
More working than before
Rev: server/modules/tags/translation_mod.pike:1.2
17:
class TagTranslationRegistration { inherit RXML.Tag; constant name = "trans-reg";
-
constant flags = RXML.FLAG_EMPTY_
ENTITY
;
+
constant flags = RXML.FLAG_EMPTY_
ELEMENT
;
mapping(string:RXML.Type) req_arg_types = ([ "project":RXML.t_text, "path":RXML.t_text ]);
31:
#else RoxenLocale.register_project(args->project, args->path); #endif
+
id->misc->translation_proj=args->project;
result = ""; return 0; }
41:
inherit RXML.Tag; constant name = "translate";
-
mapping(string:RXML.Type) req_arg_types = ([ "
project
":RXML.t_text
,
-
"id":RXML.t_text
]);
-
mapping(string:RXML.Type)
opt_arg_types
=
([
"variable":RXML.t_text,
+
mapping(string:RXML.Type) req_arg_types = ([ "
id
":RXML.t_text
]);
+
mapping(string:RXML.Type)
opt_arg_types
=
([
"project":RXML.t_text,
+
"variable":RXML.t_text,
"scope":RXML.t_text ]); class Frame { inherit RXML.Frame; array do_return(RequestID id) {
-
+
string proj = args->project || id->misc->translation_proj;
#if constant(Locale.transtale)
-
string trans = Locale.translate(roxen.locale->get()[
args->project
],
+
string trans = Locale.translate(roxen.locale->get()[
proj
],
args->id, content); #else
-
string trans = RoxenLocale.translate(roxen.locale->get()[
args->project
],
+
string trans = RoxenLocale.translate(roxen.locale->get()[
proj
],
args->id, content); #endif