diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5051723cc7..a506e4f054 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,60 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-06-18 00:10 UTC+0200 Przemyslaw Czerpak + * harbour/include/hbapilng.h + * harbour/include/hblang.ch + * harbour/source/lang/Makefile + * harbour/source/lang/msg_tpl.c + * harbour/source/lang/msgca.c + * harbour/source/lang/msgcs852.c + * harbour/source/lang/msgcsiso.c + * harbour/source/lang/msgcskam.c + * harbour/source/lang/msgcswin.c + * harbour/source/lang/msgde.c + * harbour/source/lang/msgdewin.c + * harbour/source/lang/msgen.c + * harbour/source/lang/msgeo.c + * harbour/source/lang/msges.c + * harbour/source/lang/msgeswin.c + * harbour/source/lang/msgeu.c + * harbour/source/lang/msgfr.c + * harbour/source/lang/msggl.c + * harbour/source/lang/msghe862.c + * harbour/source/lang/msghewin.c + * harbour/source/lang/msghr852.c + * harbour/source/lang/msghriso.c + * harbour/source/lang/msghu852.c + * harbour/source/lang/msghucwi.c + * harbour/source/lang/msghuwin.c + * harbour/source/lang/msgid.c + * harbour/source/lang/msgis850.c + * harbour/source/lang/msgit.c + * harbour/source/lang/msgko.c + * harbour/source/lang/msgpl852.c + * harbour/source/lang/msgpliso.c + * harbour/source/lang/msgplmaz.c + * harbour/source/lang/msgplwin.c + * harbour/source/lang/msgpt.c + * harbour/source/lang/msgro.c + * harbour/source/lang/msgru866.c + * harbour/source/lang/msgrukoi.c + * harbour/source/lang/msgruwin.c + * harbour/source/lang/msgsl852.c + * harbour/source/lang/msgsliso.c + * harbour/source/lang/msgslwin.c + * harbour/source/lang/msgsr852.c + * harbour/source/lang/msgsriso.c + * harbour/source/lang/msgzhb5.c + * harbour/source/lang/msgzhgb.c + + harbour/source/lang/msgsrwin.c + ! bug fixed in national msg system and new localization added + (borrowed from xHarbour) + + + harbour/tests/langmsg.prg + * simple test program for national messages + I have to ask developpers to run it and check their national messages + 2003-06-17 21:50 UTC+0300 Alexander Kresin * source/rtl/cdpapi.c ! Bug fixed in hb_cdpTranslate() and hb_cdpnTranslate() diff --git a/harbour/include/hbapilng.h b/harbour/include/hbapilng.h index aaa7adf231..323e0dc185 100644 --- a/harbour/include/hbapilng.h +++ b/harbour/include/hbapilng.h @@ -57,20 +57,12 @@ #include "hbvmpub.h" #include "hbinit.h" +#include "hblang.ch" /* Base values for the unified language item table */ + #if defined(HB_EXTERN_C) extern "C" { #endif -/* Base values for the unified language item table */ -#define HB_LANG_ITEM_BASE_ID 0 -#define HB_LANG_ITEM_BASE_MONTH 6 -#define HB_LANG_ITEM_BASE_DAY 18 -#define HB_LANG_ITEM_BASE_NATMSG 25 -#define HB_LANG_ITEM_BASE_ERRDESC 38 -#define HB_LANG_ITEM_BASE_ERRINTR 89 -#define HB_LANG_ITEM_BASE_TEXT 114 -#define HB_LANG_ITEM_MAX_ 117 - /* This hack is needed to force preprocessing if id is also a macro */ #define HB_LANG_REQUEST( id ) HB_LANG_REQUEST_( id ) #define HB_LANG_REQUEST_( id ) extern HB_FUNC( HB_LANG_##id ); \ diff --git a/harbour/include/hblang.ch b/harbour/include/hblang.ch index ea2453b7d0..4f3c071bad 100644 --- a/harbour/include/hblang.ch +++ b/harbour/include/hblang.ch @@ -59,9 +59,11 @@ #define HB_LANG_ITEM_BASE_NATMSG 25 #define HB_LANG_ITEM_BASE_ERRDESC 38 #define HB_LANG_ITEM_BASE_ERRINTR 89 -#define HB_LANG_ITEM_BASE_TEXT 114 -#define HB_LANG_ITEM_MAX_ 117 +#define HB_LANG_ITEM_BASE_TEXT 115 +#define HB_LANG_ITEM_MAX_ 118 -#translate HB_LANG_REQUEST => REQUEST HB_LANG_ +#ifndef HB_APILNG_H_ + #translate HB_LANG_REQUEST => REQUEST HB_LANG_ +#endif #endif /* HB_LANG_CH_ */ diff --git a/harbour/source/lang/Makefile b/harbour/source/lang/Makefile index 9be7b9baec..a9516c561f 100644 --- a/harbour/source/lang/Makefile +++ b/harbour/source/lang/Makefile @@ -15,7 +15,7 @@ C_SOURCES=\ msgen.c \ msgeo.c \ msges.c \ - msgeswin.c \ + msgeswin.c \ msgeu.c \ msgfr.c \ msggl.c \ @@ -44,6 +44,7 @@ C_SOURCES=\ msgslwin.c \ msgsr852.c \ msgsriso.c \ + msgsrwin.c \ msgzhb5.c \ msgzhgb.c \ diff --git a/harbour/source/lang/msg_tpl.c b/harbour/source/lang/msg_tpl.c index 8069023ed5..4ca0800ed9 100644 --- a/harbour/source/lang/msg_tpl.c +++ b/harbour/source/lang/msg_tpl.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgca.c b/harbour/source/lang/msgca.c index 191e08f3b0..a7db66839a 100644 --- a/harbour/source/lang/msgca.c +++ b/harbour/source/lang/msgca.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgcs852.c b/harbour/source/lang/msgcs852.c index a775ea5c60..05bbcd575f 100644 --- a/harbour/source/lang/msgcs852.c +++ b/harbour/source/lang/msgcs852.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgcsiso.c b/harbour/source/lang/msgcsiso.c index c56835ac4f..90871a39f8 100644 --- a/harbour/source/lang/msgcsiso.c +++ b/harbour/source/lang/msgcsiso.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgcskam.c b/harbour/source/lang/msgcskam.c index 4b97e7fd7c..dde2010931 100644 --- a/harbour/source/lang/msgcskam.c +++ b/harbour/source/lang/msgcskam.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgcswin.c b/harbour/source/lang/msgcswin.c index bc4b035c2e..bb2d6b10ba 100644 --- a/harbour/source/lang/msgcswin.c +++ b/harbour/source/lang/msgcswin.c @@ -158,6 +158,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgde.c b/harbour/source/lang/msgde.c index 2eb99c47bd..6006218b1e 100644 --- a/harbour/source/lang/msgde.c +++ b/harbour/source/lang/msgde.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgdewin.c b/harbour/source/lang/msgdewin.c index 068ab56416..63294b3043 100644 --- a/harbour/source/lang/msgdewin.c +++ b/harbour/source/lang/msgdewin.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgen.c b/harbour/source/lang/msgen.c index eba575e13f..c761c19c41 100644 --- a/harbour/source/lang/msgen.c +++ b/harbour/source/lang/msgen.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgeo.c b/harbour/source/lang/msgeo.c index 51f7b9ffcc..25904d4e81 100644 --- a/harbour/source/lang/msgeo.c +++ b/harbour/source/lang/msgeo.c @@ -158,6 +158,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msges.c b/harbour/source/lang/msges.c index e0ba050c6b..5d0bd9500e 100644 --- a/harbour/source/lang/msges.c +++ b/harbour/source/lang/msges.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "acceso al array", "asignacin del array", "dimensin del array", diff --git a/harbour/source/lang/msgeswin.c b/harbour/source/lang/msgeswin.c index fdc1a4f05b..26d0c38e80 100644 --- a/harbour/source/lang/msgeswin.c +++ b/harbour/source/lang/msgeswin.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "acceso al array", "asignacin del array", "dimensin del array", diff --git a/harbour/source/lang/msgeu.c b/harbour/source/lang/msgeu.c index e72ac19caa..50e5655d66 100644 --- a/harbour/source/lang/msgeu.c +++ b/harbour/source/lang/msgeu.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "taula-atzipena", "yaula-esleipen", "array dimension", diff --git a/harbour/source/lang/msgfr.c b/harbour/source/lang/msgfr.c index 38ebfc9cae..829b1eaaf3 100644 --- a/harbour/source/lang/msgfr.c +++ b/harbour/source/lang/msgfr.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msggl.c b/harbour/source/lang/msggl.c index 8b1c333420..9f0264d149 100644 --- a/harbour/source/lang/msggl.c +++ b/harbour/source/lang/msggl.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msghe862.c b/harbour/source/lang/msghe862.c index 6152e97834..96190a1b88 100644 --- a/harbour/source/lang/msghe862.c +++ b/harbour/source/lang/msghe862.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", " ", " ", "array assign", diff --git a/harbour/source/lang/msghewin.c b/harbour/source/lang/msghewin.c index 9aae7ac7eb..c2421ed83e 100644 --- a/harbour/source/lang/msghewin.c +++ b/harbour/source/lang/msghewin.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", " ", " ", "array assign", diff --git a/harbour/source/lang/msghr852.c b/harbour/source/lang/msghr852.c index d0cefd2ac5..3f7cd78227 100644 --- a/harbour/source/lang/msghr852.c +++ b/harbour/source/lang/msghr852.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msghriso.c b/harbour/source/lang/msghriso.c index 06328be92d..d54cf3b8c7 100644 --- a/harbour/source/lang/msghriso.c +++ b/harbour/source/lang/msghriso.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msghu852.c b/harbour/source/lang/msghu852.c index 5d2d753741..dcdf3742bc 100644 --- a/harbour/source/lang/msghu852.c +++ b/harbour/source/lang/msghu852.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "tmbelem hozzfrs", "tmbelem rtkads", "tmbelem dimenzi", diff --git a/harbour/source/lang/msghucwi.c b/harbour/source/lang/msghucwi.c index fc6a8992ac..719965e819 100644 --- a/harbour/source/lang/msghucwi.c +++ b/harbour/source/lang/msghucwi.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "tmbelem hozzfrs", "tmbelem rtkads", "tmbelem dimenzi", diff --git a/harbour/source/lang/msghuwin.c b/harbour/source/lang/msghuwin.c index 3b37a43233..ec4bb62c26 100644 --- a/harbour/source/lang/msghuwin.c +++ b/harbour/source/lang/msghuwin.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "tmbelem hozzfrs", "tmbelem rtkads", "tmbelem dimenzi", diff --git a/harbour/source/lang/msgid.c b/harbour/source/lang/msgid.c index f88bfc2012..9cdfb9d132 100644 --- a/harbour/source/lang/msgid.c +++ b/harbour/source/lang/msgid.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgis850.c b/harbour/source/lang/msgis850.c index d797ee945c..382388a1ef 100644 --- a/harbour/source/lang/msgis850.c +++ b/harbour/source/lang/msgis850.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgit.c b/harbour/source/lang/msgit.c index 06e27f8792..2a2c1b5453 100644 --- a/harbour/source/lang/msgit.c +++ b/harbour/source/lang/msgit.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "accesso all'array", "assegnazione all'array", "dimensione dell'array", diff --git a/harbour/source/lang/msgko.c b/harbour/source/lang/msgko.c index 6a1ef50c60..1d308e7159 100644 --- a/harbour/source/lang/msgko.c +++ b/harbour/source/lang/msgko.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgpl852.c b/harbour/source/lang/msgpl852.c index eae16cd312..8ca6808779 100644 --- a/harbour/source/lang/msgpl852.c +++ b/harbour/source/lang/msgpl852.c @@ -155,6 +155,7 @@ static HB_LANG s_lang = "Nie udao si zablokowa dostpu", "", "", + "", "", "Nieprawidowa liczba argumentw", "pobranie elementu tablicy", diff --git a/harbour/source/lang/msgpliso.c b/harbour/source/lang/msgpliso.c index 01da0cfcb6..6b3b451211 100644 --- a/harbour/source/lang/msgpliso.c +++ b/harbour/source/lang/msgpliso.c @@ -155,6 +155,7 @@ static HB_LANG s_lang = "Nie udao si zablokowa dostpu", "", "", + "", "", "Nieprawidowa liczba argumentw", "pobranie elementu tablicy", diff --git a/harbour/source/lang/msgplmaz.c b/harbour/source/lang/msgplmaz.c index d5fa37face..db3ef2d2a0 100644 --- a/harbour/source/lang/msgplmaz.c +++ b/harbour/source/lang/msgplmaz.c @@ -155,6 +155,7 @@ static HB_LANG s_lang = "Nie udao si zablokowa dostpu", "", "", + "", "", "Nieprawidowa liczba argumentw", "pobranie elementu tablicy", diff --git a/harbour/source/lang/msgplwin.c b/harbour/source/lang/msgplwin.c index f7edf919bc..2c259b8d45 100644 --- a/harbour/source/lang/msgplwin.c +++ b/harbour/source/lang/msgplwin.c @@ -155,6 +155,7 @@ static HB_LANG s_lang = "Nie udao si zablokowa dostpu", "", "", + "", "", "Nieprawidowa liczba argumentw", "pobranie elementu tablicy", diff --git a/harbour/source/lang/msgpt.c b/harbour/source/lang/msgpt.c index 5ccf866783..3b52e1771f 100644 --- a/harbour/source/lang/msgpt.c +++ b/harbour/source/lang/msgpt.c @@ -168,6 +168,7 @@ static HB_LANG s_lang = "", "", "", + "", "acesso de array", "array assign", "" diff --git a/harbour/source/lang/msgro.c b/harbour/source/lang/msgro.c index 7905ff28e9..686c527821 100644 --- a/harbour/source/lang/msgro.c +++ b/harbour/source/lang/msgro.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgru866.c b/harbour/source/lang/msgru866.c index 6728d1e838..5cd06f81f3 100644 --- a/harbour/source/lang/msgru866.c +++ b/harbour/source/lang/msgru866.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", "୮ ⢮ 㬥⮢", " ᨢ", "᢮ ᨢ", diff --git a/harbour/source/lang/msgrukoi.c b/harbour/source/lang/msgrukoi.c index 2f22d26cbe..854dea716e 100644 --- a/harbour/source/lang/msgrukoi.c +++ b/harbour/source/lang/msgrukoi.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", " ", " ", " ", diff --git a/harbour/source/lang/msgruwin.c b/harbour/source/lang/msgruwin.c index eb7db1a822..0f76b6d1a2 100644 --- a/harbour/source/lang/msgruwin.c +++ b/harbour/source/lang/msgruwin.c @@ -156,6 +156,7 @@ static HB_LANG s_lang = "", "", "", + "", " ", " ", " ", diff --git a/harbour/source/lang/msgsl852.c b/harbour/source/lang/msgsl852.c index adfe78b5d6..97c4e25cc7 100644 --- a/harbour/source/lang/msgsl852.c +++ b/harbour/source/lang/msgsl852.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgsliso.c b/harbour/source/lang/msgsliso.c index 5fce888c6b..172fbd9e98 100644 --- a/harbour/source/lang/msgsliso.c +++ b/harbour/source/lang/msgsliso.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgslwin.c b/harbour/source/lang/msgslwin.c index c17b300e34..99ff342aaa 100644 --- a/harbour/source/lang/msgslwin.c +++ b/harbour/source/lang/msgslwin.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgsr852.c b/harbour/source/lang/msgsr852.c index 380a0cdc8c..d742371a67 100644 --- a/harbour/source/lang/msgsr852.c +++ b/harbour/source/lang/msgsr852.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgsriso.c b/harbour/source/lang/msgsriso.c index b6082a3fe1..69ff41083d 100644 --- a/harbour/source/lang/msgsriso.c +++ b/harbour/source/lang/msgsriso.c @@ -139,6 +139,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgsrwin.c b/harbour/source/lang/msgsrwin.c new file mode 100644 index 0000000000..84aa4b7b2d --- /dev/null +++ b/harbour/source/lang/msgsrwin.c @@ -0,0 +1,211 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (SRWIN) + * + * Copyright 2003 Srdjan Dragojlovic + * www - http://www.xHarbour.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* Language name: Serbian */ +/* ISO language code (2 chars): SR */ +/* Codepage: Windows-1251 */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "SRWIN", /* ID */ + "Serbian", /* Name (in English) */ + "", /* Name (in native language) */ + "SR", /* RFC ID */ + "1251", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + + /* Day names */ + + "s", + "s", + "", + "", + "", + "", + "" + + /* CA-Cl*pper compatible natmsg items */ + + "j # o . ", + " ?", + ".N", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + " ", + ": ", + " - ", + "/", + " ", + + /* Error description names */ + + " ", + " ", + " ", + " ", + " ", + "o ", + " ", + " ", + " ", + "", + "", + "s ", + " ", + " ", + "o ", + " ", + "o ", + "s ", + " z ", + "", + " o", + " o", + " o", + " o", + " ", + " ", + "", + "", + "", + "", + " ", + " ", + " ZO", + " ", + " ", + " ", + " ", + " ", + " so", + " s", + "o s", + " so", + "", + "", + "", + "", + " ", + " ", + " ", + " ", + "o" + + + /* Internal error names */ + + " %lu: ", + " ", + " ERRORBLOCK() ", + " ", + " RDD", + " %s", + "hb_xgrab ", + "hb_xrealloc NULL ", + "hb_xrealloc ", + "hb_xrealloc ", + "hb_xfree ", + "hb_xfree NULL ", + " : \'%s\'", + " ", + "VM: ", + "%s: ", + "%s: self", + "%s: ", + "%s: ", + " ", + "%s: ", + "%s: ", + " ", + "hb_xgrab requested to allocate zero bytes", + "hb_xrealloc requested to resize to zero bytes", + "hb_xalloc requested to allocate zero bytes", + + /* Texts */ + + "..", + "", + "" + } +}; + +HB_LANG_ANNOUNCE( SRWIN ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_SRWIN ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_SRWIN ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_SRWIN +#endif diff --git a/harbour/source/lang/msgzhb5.c b/harbour/source/lang/msgzhb5.c index d98c267190..79b67992be 100644 --- a/harbour/source/lang/msgzhb5.c +++ b/harbour/source/lang/msgzhb5.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/source/lang/msgzhgb.c b/harbour/source/lang/msgzhgb.c index 57d14a53ca..3d9d0527c3 100644 --- a/harbour/source/lang/msgzhgb.c +++ b/harbour/source/lang/msgzhgb.c @@ -157,6 +157,7 @@ static HB_LANG s_lang = "", "", "", + "", "array access", "array assign", "array dimension", diff --git a/harbour/tests/langmsg.prg b/harbour/tests/langmsg.prg new file mode 100644 index 0000000000..afe8fefaeb --- /dev/null +++ b/harbour/tests/langmsg.prg @@ -0,0 +1,376 @@ +/* + + * $Id$ + + */ + + + +/* + + * Copyright 2003 Przemyslaw Czerpak + + * See doc/license.txt for licensing terms. + + */ + + + +#include "hblang.ch" + + + +function main( cLng ) + +local i, a, aDay, aMnt, aErr, aInt, cDtFrm, cTrue, cFalse + + + +HB_LANGSELECT("EN") + +aDay:=GET_DAYS() + +aMnt:=GET_MONTHS() + +aErr:=GET_ERR() + +aInt:=GET_IERR() + +cDtFrm:=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT ) + +cTrue :=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 1 ) + +cFalse:=HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 2 ) + + + +if !empty( cLng ) + + HB_LANGSELECT( UPPER( cLng ) ) + +endif + + + +? HB_LANGNAME() + +? "HB_LANG_ITEM_BASE_ID ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ID )+"]" + +? "HB_LANG_ITEM_BASE_MONTH ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_MONTH )+"]" + +? "HB_LANG_ITEM_BASE_DAY ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_DAY )+"]" + +? "HB_LANG_ITEM_BASE_NATMSG ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_NATMSG )+"]" + +? "HB_LANG_ITEM_BASE_ERRDESC", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRDESC)+"]" + +? "HB_LANG_ITEM_BASE_ERRINTR", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRINTR)+"]" + +? "HB_LANG_ITEM_BASE_TEXT ", "["+HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT )+"]" + +? "HB_LANGERRMSG(0)", HB_LANGERRMSG(0) + +? + +? "date format: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT ) + " (" + cDtFrm + ")" + +? " TRUE val: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 1 ) + " (" + cTrue + ")" + +? " FALSE val: " + HB_LANGMESSAGE(HB_LANG_ITEM_BASE_TEXT + 2 ) + " (" + cFalse + ")" + +? + +inkey(0) + + + +? "Errors:" + +? "-------" + +a:=GET_ERR() + +for i:=1 to len(a) + + ? padr(a[i,1],15) + "|" + padr(aErr[i,2],30) + "|" + padr(a[i,2],32) + +next + +? + +inkey(0) + + + +? "Internal errors:" + +? "----------------" + +a:=GET_IERR() + +for i:=1 to len(a) + + ? padr(a[i,1],15) + "|" + padr(aInt[i,2],30) + "|" + padr(a[i,2],32) + +next + +? + +inkey(0) + + + +? "Days:" + +? "-----" + +a:=GET_DAYS() + +for i:=1 to len(a) + + ? " " + padr(aDay[i],15) + a[i] + +next + +? + +inkey(0) + + + +? "Months:" + +? "-------" + +a:=GET_MONTHS() + +for i:=1 to len(a) + + ? " " + padr(aMnt[i],15) + a[i] + +next + +? + +inkey(0) + + + +return nil + + + +function GET_DAYS() + +LOCAL i, n, aDays[7], dt:=date() + +for i:=1 to 7 + + n:=dow(dt) + + aDays[n]:=cdow(dt) + + ++dt + +next + +return (aDays) + + + +function GET_MONTHS() + +LOCAL i, n, aMonths[12], dt:=date() + +dt-=day(dt)-1 + +for i:=1 to 12 + + n:=month(dt) + + aMonths[n]:=cmonth(dt) + + dt+=31 + + dt-=day(dt)-1 + +next + +return (aMonths) + + + +function GET_ERR() + +local aErr + +aErr := { { "EG_ARG ", HB_LANGERRMSG( 1 ) }, ; + + { "EG_BOUND ", HB_LANGERRMSG( 2 ) }, ; + + { "EG_STROVERFLOW ", HB_LANGERRMSG( 3 ) }, ; + + { "EG_NUMOVERFLOW ", HB_LANGERRMSG( 4 ) }, ; + + { "EG_ZERODIV ", HB_LANGERRMSG( 5 ) }, ; + + { "EG_NUMERR ", HB_LANGERRMSG( 6 ) }, ; + + { "EG_SYNTAX ", HB_LANGERRMSG( 7 ) }, ; + + { "EG_COMPLEXITY ", HB_LANGERRMSG( 8 ) }, ; + + { " ", HB_LANGERRMSG( 9 ) }, ; + + { " ", HB_LANGERRMSG( 10 ) }, ; + + { "EG_MEM ", HB_LANGERRMSG( 11 ) }, ; + + { "EG_NOFUNC ", HB_LANGERRMSG( 12 ) }, ; + + { "EG_NOMETHOD ", HB_LANGERRMSG( 13 ) }, ; + + { "EG_NOVAR ", HB_LANGERRMSG( 14 ) }, ; + + { "EG_NOALIAS ", HB_LANGERRMSG( 15 ) }, ; + + { "EG_NOVARMETHOD ", HB_LANGERRMSG( 16 ) }, ; + + { "EG_BADALIAS ", HB_LANGERRMSG( 17 ) }, ; + + { "EG_DUPALIAS ", HB_LANGERRMSG( 18 ) }, ; + + { "EG_NOOBJECT ", HB_LANGERRMSG( 19 ) }, ; + + { "EG_CREATE ", HB_LANGERRMSG( 20 ) }, ; + + { "EG_OPEN ", HB_LANGERRMSG( 21 ) }, ; + + { "EG_CLOSE ", HB_LANGERRMSG( 22 ) }, ; + + { "EG_READ ", HB_LANGERRMSG( 23 ) }, ; + + { "EG_WRITE ", HB_LANGERRMSG( 24 ) }, ; + + { "EG_PRINT ", HB_LANGERRMSG( 25 ) }, ; + + { " ", HB_LANGERRMSG( 26 ) }, ; + + { " ", HB_LANGERRMSG( 27 ) }, ; + + { " ", HB_LANGERRMSG( 28 ) }, ; + + { " ", HB_LANGERRMSG( 29 ) }, ; + + { "EG_UNSUPPORTED ", HB_LANGERRMSG( 30 ) }, ; + + { "EG_LIMIT ", HB_LANGERRMSG( 31 ) }, ; + + { "EG_CORRUPTION ", HB_LANGERRMSG( 32 ) }, ; + + { "EG_DATATYPE ", HB_LANGERRMSG( 33 ) }, ; + + { "EG_DATAWIDTH ", HB_LANGERRMSG( 34 ) }, ; + + { "EG_NOTABLE ", HB_LANGERRMSG( 35 ) }, ; + + { "EG_NOORDER ", HB_LANGERRMSG( 36 ) }, ; + + { "EG_SHARED ", HB_LANGERRMSG( 37 ) }, ; + + { "EG_UNLOCKED ", HB_LANGERRMSG( 38 ) }, ; + + { "EG_READONLY ", HB_LANGERRMSG( 39 ) }, ; + + { "EG_APPENDLOCK ", HB_LANGERRMSG( 40 ) }, ; + + { "EG_LOCK ", HB_LANGERRMSG( 41 ) }, ; + + { " ", HB_LANGERRMSG( 42 ) }, ; + + { " ", HB_LANGERRMSG( 43 ) }, ; + + { " ", HB_LANGERRMSG( 44 ) }, ; + + { " ", HB_LANGERRMSG( 45 ) }, ; + + { "EG_ARRACCESS ", HB_LANGERRMSG( 46 ) }, ; + + { "EG_ARRASSIGN ", HB_LANGERRMSG( 47 ) }, ; + + { "EG_ARRDIMENSION", HB_LANGERRMSG( 48 ) }, ; + + { "EG_NOTARRAY ", HB_LANGERRMSG( 49 ) }, ; + + { "EG_CONDITION ", HB_LANGERRMSG( 50 ) } } + +return aErr + + + +function HB_LANGERRINTR(n) + +return HB_LANGMESSAGE(HB_LANG_ITEM_BASE_ERRINTR + n - 9000 ) + + + +function GET_IERR() + +local aErr + +aErr := { ; + + { "HB_EI_ERRUNRECOV ", HB_LANGERRINTR(9000) }, ; + + { "HB_EI_ERRRECFAILURE ", HB_LANGERRINTR(9001) }, ; + + { "HB_EI_ERRNOBLOCK ", HB_LANGERRINTR(9002) }, ; + + { "HB_EI_ERRTOOMANY ", HB_LANGERRINTR(9003) }, ; + + { "HB_EI_RDDINVALID ", HB_LANGERRINTR(9004) }, ; + + { "HB_EI_CLSINVMETHOD ", HB_LANGERRINTR(9005) }, ; + + { "HB_EI_XGRABALLOC ", HB_LANGERRINTR(9006) }, ; + + { "HB_EI_XREALLOCNULL ", HB_LANGERRINTR(9007) }, ; + + { "HB_EI_XREALLOCINV ", HB_LANGERRINTR(9008) }, ; + + { "HB_EI_XREALLOC ", HB_LANGERRINTR(9009) }, ; + + { "HB_EI_XFREEINV ", HB_LANGERRINTR(9010) }, ; + + { "HB_EI_XFREENULL ", HB_LANGERRINTR(9011) }, ; + + { "HB_EI_VMBADSTARTUP ", HB_LANGERRINTR(9012) }, ; + + { "HB_EI_VMNOSTARTUP ", HB_LANGERRINTR(9013) }, ; + + { "HB_EI_VMBADOPCODE ", HB_LANGERRINTR(9014) }, ; + + { "HB_EI_VMNOTSYMBOL ", HB_LANGERRINTR(9015) }, ; + + { "HB_EI_VMINVSYMBOL ", HB_LANGERRINTR(9016) }, ; + + { "HB_EI_VMNOTCBLOCK ", HB_LANGERRINTR(9017) }, ; + + { "HB_EI_VMPOPINVITEM ", HB_LANGERRINTR(9018) }, ; + + { "HB_EI_STACKUFLOW ", HB_LANGERRINTR(9019) }, ; + + { "HB_EI_ITEMBADCOPY ", HB_LANGERRINTR(9020) }, ; + + { "HB_EI_MVBADSYMBOL ", HB_LANGERRINTR(9021) }, ; + + { "HB_EI_XMEMOVERFLOW ", HB_LANGERRINTR(9022) }, ; + + { "HB_EI_XGRABNULLSIZE ", HB_LANGERRINTR(9023) }, ; + + { "HB_EI_XREALLOCNULLSIZE", HB_LANGERRINTR(9024) }, ; + + { "HB_EI_XALLOCNULLSIZE ", HB_LANGERRINTR(9025) } } + +return aErr +