← Back to team overview

kicad-developers team mailing list archive

Re: r1214 build error

 

IMO the solutions isn't bad, but the place where these definitions are
lying is very bad. This should be something like kicad_languages.h.

I am not sure how compilers handles these but it seems that such
arrays could be initialized without giving initial size. Second method
is to have list of IDs held as enum, and at the last position
ID_LANGUAGE_HOW_MANY (or something similar; currently it is
(ID_LANGUAGE_CHOICE_END - LANGUAGE_CHOICE - 2)*).

It would be much better to have set of IDs for language menus in
convention
ID_LANGUAGE_START
ID_LANGUAGE_ENGLISH = ID_LANGUAGE_START + wxLANGUAGE_ENGLISH
ID_LANGUAGE_END = ID_LANGUAGE_START + 1000
but in relation to a mess in wxWindows/include/wx/intl.h it is not
possible.

M.

--- In kicad-devel@xxxxxxxxxxxxxxx, "tomas.modeer" <tomas.modeer@...>
wrote:
>
> The size of the language array in common/edaappl.cpp is wrong, having 
> them in a static array is perhaps not the best solution. 
> 
> /tomas
> 
> 
> Index: common/edaappl.cpp
> ===================================================================
> --- common/edaappl.cpp	(revision 1214)
> +++ common/edaappl.cpp	(working copy)
> @@ -53,7 +53,7 @@
> bool m_DoNotTranslate; // set to 
> true if the m_Lang_Label must not be translated
> };
>  
> -#define LANGUAGE_DESCR_COUNT 15
> +#define LANGUAGE_DESCR_COUNT 16
> static struct LANGUAGE_DESCR s_Language_List[LANGUAGE_DESCR_COUNT] =
> {
> {
>







References