[sword-devel] isalnum(3) for i18n
Ben Morgan
benpmorgan at gmail.com
Mon Aug 11 20:35:06 MST 2008
Hi Karl,
Currently such module names are not "allowed".
Quoting from the wiki <http://crosswire.org/wiki/index.php/DevTools:Modules>
:
Each conf file begins with [name], replacing "name" with be a short well
known abbreviation. This must be on the first line, and start the first
line. It can only contain A-Z, a-z and 0-9.
The name of the file should be the lowercase of this name followed by .conf.
For example, [MyModule] would be mymodule.conf.
I think foreign languages are hard done by with the module names for two
reasons:
1. They can't be non-english
2. They seem to start with a prefix based on the language (e.g. FreBBB,
GerAlbrecht, BurJudson).
I don't think these prefixes help anything, and they just waste available
screen space.
Maybe we should prefix every english module with Eng :-) (e.g. EngKJV,
EngABS_Essay_GoodSam_SWB)
As to checking the input, g_unichar_isalnum would be the function to call, I
think. Personally I would use a regular expression, though.
God Bless,
Ben
-------------------------------------------------------------------------------------------
The Lord is not slow to fulfill his promise as some count slowness,
but is patient toward you, not wishing that any should perish,
but that all should reach repentance.
2 Peter 3:9 (ESV)
On Tue, Aug 12, 2008 at 12:21 PM, Karl Kleinpaste <karl at kleinpaste.org>wrote:
> GnomeSword can create user-editable modules from scratch, and can rename
> personal commentary modules. It needs to guarantee that names offered
> are acceptable, and as a fairly bland verification policy, the code
> ensures that these name strings conform to isalnum(3).
>
> Now we've got a bug report that such a policy doesn't provide for i18n
> names (the bug reporter is Swedish).
>
> Can anybody offer some sample code by which to take a string as pulled
> out of a generic GTK dialog result and convert it to a suitable
> i18n-compatible format so I can do the similar process using something
> like iswalnum(3)? I don't find much in the way of samples from which to
> work with wint_t (or whatever else I would need to use).
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20080812/89c5d454/attachment.html
More information about the sword-devel
mailing list