Branch: Tag:

2000-07-15

2000-07-15 01:06:48 by Andreas Lange <andreas@lange.cx>

Locale API change and updates

Rev: server/base_server/configuration.pike:1.322
Rev: server/base_server/global_variables.pike:1.36
Rev: server/base_server/module_support.pike:1.73
Rev: server/base_server/roxen.pike:1.508
Rev: server/config_interface/standard/cv_startpage_tabs.pike:1.14
Rev: server/config_interface/standard/event_log/log.pike:1.7
Rev: server/config_interface/standard/logutil.pike:1.9
Rev: server/config_interface/standard/sites/config_left_item.pike:1.30
Rev: server/config_interface/standard/sites/site_content.pike:1.69
Rev: server/config_interface/standard/template:1.64
Rev: server/config_interface/standard/topmenu.pike:1.7
Rev: server/etc/include/roxen.h:1.13
Rev: server/etc/modules/OldVariable.pmod:1.14
Rev: server/etc/modules/RoxenLocale.pmod/module.pmod:1.12
Rev: server/modules/configuration/config_filesystem.pike:1.38
Rev: server/modules/configuration/config_tags.pike:1.94
Rev: server/modules/configuration/config_userdb.pike:1.43
Rev: server/modules/tags/translation_mod.pike:1.3
Rev: server/translations/configs/base_server.xml:1.2(DEAD)
Rev: server/translations/configs/config_interface.xml:1.1

1: - // $Id: roxen.h,v 1.12 2000/07/11 01:46:03 nilsson Exp $ + // $Id: roxen.h,v 1.13 2000/07/15 01:03:58 lange Exp $   #ifndef _ROXEN_H_      #define _ROXEN_H_
9:   #define perror roxen_perror      // Localization support - #ifndef _DEF_LOCALE - # if constant(Locale.translate) - # define _DEF_LOCALE(X,Y) ([string](mixed)Locale.DeferredLocale(GETLOCOBJ,X,Y)) - # else - # define _DEF_LOCALE(X,Y) ([string](mixed)RoxenLocale.DeferredLocale(GETLOCOBJ,X,Y)) - # endif - #endif -  +    #ifndef _STR_LOCALE   # if constant(Locale.translate)   # ifdef IN_ROXEN - # define _STR_LOCALE(Z,X,Y) (Locale.translate(locale->get()->Z, X, Y)) + # define _STR_LOCALE(Z,X,Y) (Locale.translate(Z, locale->get(), X, Y))   # else - # define _STR_LOCALE(Z,X,Y) (Locale.translate(roxen.locale->get()->Z, X, Y)) + # define _STR_LOCALE(Z,X,Y) (Locale.translate(Z, roxen.locale->get(), X,Y))   # endif   # else   # ifdef IN_ROXEN - # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(locale->get()->Z, X, Y)) + # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(Z, locale->get(), X, Y))   # else - # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(roxen.locale->get()->Z, X, Y)) + # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(Z, roxen.locale->get(), X, Y))   # endif   # endif   #endif    - #ifndef LOCALE_PROJECT + #ifndef _DEF_LOCALE + # if constant(Locale.translate) + # define _DEF_LOCALE(Z,X,Y) ([string](mixed)Locale.DeferredLocale(Z,GETLOCLANG,X,Y)) + # else + # define _DEF_LOCALE(Z,X,Y) ([string](mixed)RoxenLocale.DeferredLocale(Z,GETLOCLANG,X,Y)) + # endif + #endif +  + #ifndef USE_DEFERRED_LOCALE   # ifdef IN_ROXEN - # define LOCALE_PROJECT(X) static inline object GETLOCOBJ() {return locale->get()->X;} + # define USE_DEFERRED_LOCALE static inline string GETLOCLANG() {return locale->get();}   # else - # define LOCALE_PROJECT(X) static inline object GETLOCOBJ() {return roxen.locale->get()->X;} + # define USE_DEFERRED_LOCALE static inline string GETLOCLANG() {return roxen.locale->get();}   # endif   #endif      #endif /* _ROXEN_H_ */