[Qgis-developer] Context help - locale (Consider country?)

2013-05-13 Thread Matthias Kuhn
Hi,

The context help (e.g. click on the ? in the attribute table) does take
language AND country into account. If a help file for this very specific
combination does not exist, it falls back to the en_US help, which is
not always the best choice.

E.g.
de_CH should rather fallback to de_DE instead of en_US.

I see the following possibilities:
 * keep the lang_COUNTRY suffix for these files and in case the specific
country does not exist, just take a random file with the same lang (e.g.
-de_CH will then use -de_AT because of the same -lang part and listed
before -de_DE).
 * always provide a fallback file (e.g. -de_CH would then search for
-de_CH, and if not existent for -de which it will find, because the file
-de_DE has been copied or symlinked there.)
 * drop the COUNTRY suffix (only look for -de and if that does not exist
take -en)

I'm not really an expert in translation, so I would go for option 3. But
I'm sure somebody will discourage me and tell me, that he wants to
provide a native swiss-german translation as soon as there are official
grammar rules :-)

Cheers
Matthias
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Context help - locale (Consider country?)

2013-05-13 Thread Jürgen E . Fischer
Hi Matthias,

On Mon, 13. May 2013 at 17:14:31 +0200, Matthias Kuhn wrote:
> I see the following possibilities:
>  * keep the lang_COUNTRY suffix for these files and in case the specific
> country does not exist, just take a random file with the same lang (e.g.
> -de_CH will then use -de_AT because of the same -lang part and listed
> before -de_DE).
>  * always provide a fallback file (e.g. -de_CH would then search for
> -de_CH, and if not existent for -de which it will find, because the file
> -de_DE has been copied or symlinked there.)
>  * drop the COUNTRY suffix (only look for -de and if that does not exist
> take -en)

Another possibility:
Do something like I did with the grass modules, ie. generate cpp-code from
en-US version and let linguist pick those up.  And let the rest work as usual.

I've started to do that (ie. create a QHash for QgsExpression and something for
the context_helps).   I'll also replace the help viewer with something in gui
(we use webkit in qgis anyway).

That way we would also not have to worry that the context and function help
gets translated at all (AFAIK it's currently in the normal process) and also
see when something needs to be updated (that doesn't happen now either).


JÃrgen

-- 
Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
Dipl.-Inf. (FH)   Rheinstraße 13Fax. +49-4931-918175-50
Software Engineer D-26506 Norden   http://www.norbit.de
committ(ed|ing) to Quantum GIS IRC: jef on FreeNode 


-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Context help - locale (Consider country?)

2013-05-15 Thread Matthias Kuhn
Hi Jürgen

On Mon 13 Mai 2013 20:08:36 CEST, Jürgen E. Fischer wrote:
> Hi Matthias,
>
> On Mon, 13. May 2013 at 17:14:31 +0200, Matthias Kuhn wrote:
>> I see the following possibilities:
>>  * keep the lang_COUNTRY suffix for these files and in case the specific
>> country does not exist, just take a random file with the same lang (e.g.
>> -de_CH will then use -de_AT because of the same -lang part and listed
>> before -de_DE).
>>  * always provide a fallback file (e.g. -de_CH would then search for
>> -de_CH, and if not existent for -de which it will find, because the file
>> -de_DE has been copied or symlinked there.)
>>  * drop the COUNTRY suffix (only look for -de and if that does not exist
>> take -en)
>
> Another possibility:
> Do something like I did with the grass modules, ie. generate cpp-code from
> en-US version and let linguist pick those up.  And let the rest work as usual.

Definitely the best possibility, because it fits best to the rest of 
the UI translation.
Can you give me a hint on where to find what you have done with the 
grass modules?

>
> I've started to do that (ie. create a QHash for QgsExpression and something 
> for
> the context_helps).   I'll also replace the help viewer with something in gui
> (we use webkit in qgis anyway).
+1 for an embedded webkit widget somewhere. Right now the help  is a 
separate process and I see no reason for or benefit of this, but the 
behavior that it does not close when exiting the application seems to 
be a disadvantage. As well as the recent hack to the paths get it to 
run properly from the build directory because it resides in lib/.
You said you have started. Is that code already pushed to master?

>
> That way we would also not have to worry that the context and function help
> gets translated at all (AFAIK it's currently in the normal process) and also
> see when something needs to be updated (that doesn't happen now either).
>
>
> JÃrgen
>

Matthias
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Context help - locale (Consider country?)

2013-05-15 Thread Jürgen E . Fischer
Hi Matthias,

On Wed, 15. May 2013 at 12:37:31 +0200, Matthias Kuhn wrote:
> Can you give me a hint on where to find what you have done with the 
> grass modules?

scripts/update_ts_files.sh (ie. scripts/qgm2cpp.pl)

I think we also still need something alike for the algorithm descriptions in
sextante - didn't look into that.

> +1 for an embedded webkit widget somewhere. Right now the help  is a 
> separate process and I see no reason for or benefit of this, but the 
> behavior that it does not close when exiting the application seems to 
> be a disadvantage.

I now do.  Spawning a modeless dialog from modal dialogs doesn't work well...
I noticed only after moving the helpviewer into qgscontexthelp. So I reverted
that ;)

But I made the helpviewer read the help texts from stdin and qgscontexthelp to
write it to the helpviewer.

There is now a cmake recipes that creates a cpp file each for function and
context help from the -en_US version in resources and that is integrated
automatically into the ts file using the normal process.

I also added the non-en_US versions of the help files into the respective ts
files.  They are still there, although they aren't used anymore.

So now if there are updates to the help, only the en-US versions should be
added or updated - and the translations are in the ts files.


> As well as the recent hack to the paths get it to run properly from the build
> directory because it resides in lib/.  You said you have started. Is that
> code already pushed to master?

Yes, 4b766003 (and cdd7e9f1).

 
Jürgen 

-- 
Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
Dipl.-Inf. (FH)   Rheinstraße 13Fax. +49-4931-918175-50
Software Engineer D-26506 Norden   http://www.norbit.de
committ(ed|ing) to Quantum GIS IRC: jef on FreeNode 


-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer