digitalmars.D - Localization (i18n) Options
- Gerald (16/16) Jan 16 2016 I have a GtkD application for Linux where I would like to support
- Gerald (5/7) Jan 16 2016 And of course, 10 minutes later you stumble across a potential
- Luis (3/10) Jan 18 2016 Please, write a HowTo some where. GtkD lack of documentation it's
- Gerald (19/30) Jan 18 2016 I'll keep that in mind as I know I've struggled with that myself.
- Luis (13/44) Jan 18 2016 I browse your code and grestful code a few times. I did stuff
- Mike Wey (4/5) Jan 18 2016 https://github.com/gtkd-developers/GtkD/blob/master/makeddox.sh
- karabuta (2/16) Jan 18 2016 +1
- Johannes Pfau (4/26) Jan 18 2016 Nice stuff. You should do some advertising for these nice blog posts.
- Gerald (4/6) Jan 24 2016 I've gotten this going with Terminix and posted some information
- Luis (2/8) Jan 24 2016 :thumbsup:
- Ivan Trombley (5/11) Nov 27 2017 I tried this out but I get this compile error:
- Gerald (5/18) Nov 29 2017 Nope, you can see how Tilix is doing localization in it's repo
- drug (3/3) Nov 29 2017 Gerald, I'd like to learn how to make deb packages, could you share your...
- Ivan Trombley (11/32) Nov 30 2017 Page not found, 404.
- drug (1/1) Nov 30 2017 it was typo, should be https://gitHub.com/gnunn1/tilix
- Ivan Trombley (3/3) Nov 30 2017 Figured it out. I was initializing some member strings where they
- Jakob Ovrum (4/18) Jan 16 2016 Part of the point behind i18n-d is that we can do better than
I have a GtkD application for Linux where I would like to support localization. The current options in D seem pretty limited with the most recent being i18n-d (https://github.com/JakobOvrum/i18n-d). My code is structured for GNU gettext but I could make the effort and convert it to the way i18n-d works if that's the best option. The only other issue I can see with it is that it doesn't support country-language variations and from past experience that's a pretty big deal (just ask any Brazilians!). I'd prefer a GNU gettext implementation but I know that's not available since it has been listed as a GSOC project for a couple of years. I could roll my own GNU gettext implementation but that would be a significant effort taking away time from my project which I'd prefer to remain focused on. Are there any other options out there that I might not be aware of?
Jan 16 2016
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:Are there any other options out there that I might not be aware of?And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 16 2016
On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.Are there any other options out there that I might not be aware of?And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 18 2016
On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers. I also contributed a script that generates ddox for GtkD instead of candydoc, even though the content is the same the ddox is much better IMHO since it includes a search capability and cross references items. I hated in candydoc that it showed a method using GtkDialogFlags and I then had to grep for it to see what the flags actually are. In ddox it's all cross referenced so you can just click on the link to it to view it. Finally, if you are interested you can follow my two GtkD based projects, terminix and vgrep, on github (https://github.com/gnunn1 for concrete examples of working with GtkD.On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.Are there any other options out there that I might not be aware of?And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 18 2016
On Monday, 18 January 2016 at 14:00:05 UTC, Gerald wrote:On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:I browse your code and grestful code a few times. I did stuff with GtkD on a different approach, using GtkBuilder and Gtk autolink of functions by name. I try to avoid generating the GUI interface by code, so I can do changes editing an XML with a visual tool. I need to clean my code base before anyone could try to use it as example. I wrote a few years ago on a quick & dirty way. Were I can find the script to generate ddox for GtkD ? PD: I'm the only guy that think that a hypothetical implementation of GtkBuilder running on CTFE would be great ? So generates the GUI on compile time instead of parsing and generating stuff on runtime ?On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers. I also contributed a script that generates ddox for GtkD instead of candydoc, even though the content is the same the ddox is much better IMHO since it includes a search capability and cross references items. I hated in candydoc that it showed a method using GtkDialogFlags and I then had to grep for it to see what the flags actually are. In ddox it's all cross referenced so you can just click on the link to it to view it. Finally, if you are interested you can follow my two GtkD based projects, terminix and vgrep, on github (https://github.com/gnunn1 for concrete examples of working with GtkD.On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.Are there any other options out there that I might not be aware of?And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 18 2016
On 01/18/2016 04:06 PM, Luis wrote:Were I can find the script to generate ddox for GtkD ?https://github.com/gtkd-developers/GtkD/blob/master/makeddox.sh -- Mike Wey
Jan 18 2016
On Monday, 18 January 2016 at 15:06:12 UTC, Luis wrote:On Monday, 18 January 2016 at 14:00:05 UTC, Gerald wrote:+1[...]I browse your code and grestful code a few times. I did stuff with GtkD on a different approach, using GtkBuilder and Gtk autolink of functions by name. I try to avoid generating the GUI interface by code, so I can do changes editing an XML with a visual tool. I need to clean my code base before anyone could try to use it as example. I wrote a few years ago on a quick & dirty way. Were I can find the script to generate ddox for GtkD ? PD: I'm the only guy that think that a hypothetical implementation of GtkBuilder running on CTFE would be great ? So generates the GUI on compile time instead of parsing and generating stuff on runtime ?
Jan 18 2016
Am Mon, 18 Jan 2016 14:00:05 +0000 schrieb Gerald <me me.com>:On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:Nice stuff. You should do some advertising for these nice blog posts. Posting to D.announce and adding links from gtkd.org would be great.On Sunday, 17 January 2016 at 03:03:14 UTC, Gerald wrote:I'll keep that in mind as I know I've struggled with that myself. I have a couple of blog posts on GtkD on my site that cover how to do a couple of interesting things that you can view here http://gexperts.com and I'll probably add more as I have time. I've also contributed a couple of demos to GtkD, one for multithreading with GTK and the other on using GIO actions and popovers.On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.Are there any other options out there that I might not be aware of?And of course, 10 minutes later you stumble across a potential option. Looks like GLib exposes gettext and GtkD does wrap it so I'll play around with that and see if I can get it working. My apologies for the noise.
Jan 18 2016
On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Jan 24 2016
On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote:On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote::thumbsup:Please, write a HowTo some where. GtkD lack of documentation it's very anoying.I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Jan 24 2016
On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote:On Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:I tried this out but I get this compile error: "Error: static variable c_g_dgettext cannot be read at compile time" Did you have any issues like this?Please, write a HowTo some where. GtkD lack of documentation it's very anoying.I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Nov 27 2017
On Tuesday, 28 November 2017 at 07:39:19 UTC, Ivan Trombley wrote:On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote:Nope, you can see how Tilix is doing localization in it's repo below. I haven't looked at the localization code in awhile so I can't remember how well it still aligns with that blog post. https://gitHub.com/gnunn1/tiluxOn Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:I tried this out but I get this compile error: "Error: static variable c_g_dgettext cannot be read at compile time" Did you have any issues like this?Please, write a HowTo some where. GtkD lack of documentation it's very anoying.I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Nov 29 2017
Gerald, I'd like to learn how to make deb packages, could you share your scripts etc you use to build packages for tilix? Thank in advance)
Nov 29 2017
On Thursday, 30 November 2017 at 00:50:35 UTC, Gerald wrote:On Tuesday, 28 November 2017 at 07:39:19 UTC, Ivan Trombley wrote:Page not found, 404. BTW, this is what I tried: import glib.Internationalization; string t(string text) { return Internationalization.dgettext([], text); } That generates these errors: ~/.dub/packages/gtk-d-3.7.2/gtk-d/generated/gtkd/glib/Internation lization.d(103,23): Error: static variable c_g_dgettext cannot be read at compile time ~/.dub/packages/gtk-d-3.7.2/gtk-d/generated/gtkd/glib/Internation lization.d(103,22): called from here: toString((*c_g_dgettext)(toStringz(domain), toStringz(msgid)), 0LU)On Sunday, 24 January 2016 at 19:18:28 UTC, Gerald wrote:Nope, you can see how Tilix is doing localization in it's repo below. I haven't looked at the localization code in awhile so I can't remember how well it still aligns with that blog post. https://gitHub.com/gnunn1/tiluxOn Monday, 18 January 2016 at 09:04:48 UTC, Luis wrote:I tried this out but I get this compile error: "Error: static variable c_g_dgettext cannot be read at compile time" Did you have any issues like this?Please, write a HowTo some where. GtkD lack of documentation it's very anoying.I've gotten this going with Terminix and posted some information what it took to get it going here: http://gexperts.com/wp/gtkd-and-localization/
Nov 30 2017
Figured it out. I was initializing some member strings where they were declared in a class. I just needed to move that initialization to the constructor.
Nov 30 2017
On Sunday, 17 January 2016 at 02:51:30 UTC, Gerald wrote:I have a GtkD application for Linux where I would like to support localization. The current options in D seem pretty limited with the most recent being i18n-d (https://github.com/JakobOvrum/i18n-d). My code is structured for GNU gettext but I could make the effort and convert it to the way i18n-d works if that's the best option. The only other issue I can see with it is that it doesn't support country-language variations and from past experience that's a pretty big deal (just ask any Brazilians!).FWIW, country variation is on the TODO list (issue tracker).I'd prefer a GNU gettext implementation but I know that's not available since it has been listed as a GSOC project for a couple of years. I could roll my own GNU gettext implementation but that would be a significant effort taking away time from my project which I'd prefer to remain focused on.Part of the point behind i18n-d is that we can do better than gettext in D.
Jan 16 2016