bugGNU gettext - Bugs: bug #52788, Please provide support for the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #52788: Please provide support for the golang

Submitter:  Michael Vogt <mvogt>
Submitted:  Tue 02 Jan 2018 02:43:26 PM UTC
 
Category:  Other Severity:  4 - Important
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Wed 24 Jan 2018 03:08:17 AM UTC, comment #2: 

Absolutely.

The first thing is to review the existing implementations of a gettext runtime, which you have done.

The second thing will be to find out how a locale is chosen in the Go world.

The third thing will be to decide whether we want a gettext runtime that binds to the one in C, or one that is written entirely in Go. There seem to be different approaches in the Go world, cf. https://en.wikipedia.org/wiki/Go_(programming_language)#History

The fourth thing will be to decide about the API that the programmer should see.

Then we can go on to implement the thing.

Bruno Haible <haible>
Project Administrator
Tue 23 Jan 2018 09:59:48 PM UTC, comment #1: 

A couple of remarks.

Being able to reorder the interpolated arguments is crucial for gettext because other languages can have different word orders.  See https://golang.org/pkg/fmt/ and search for "Explicit argument indexes:".  That differs from printf format strings for C.

Go does not have a default implementation of a gettext runtime.  A quick search produced https://github.com/gosexy/gettext, https://github.com/leonelquinteros/gotext, https://github.com/snapcore/go-gettext, https://github.com/ojii/gettext.go, and probably more.  That may make it hard to agree on a set of default keywords and flags for golang.  But I haven't compared the APIs.  If they are identical, this may be a non-issue.

That's not a thumbs-down on the suggestion but rather a hint that the implementation will probably be more than a quick  copy and paste modification of the C backend.

Guido Flohr <gflohr>
Project Member
Tue 02 Jan 2018 02:43:26 PM UTC, original submission:  

It would be great for gettext to support the go programming language.

Extracting the strings is similar to C, there is a additional "raw string" (https://golang.org/ref/spec#String_literals) that is enclosed in "`".

The format strings are also similar to C with some additional `%` verbs like: %q (details in https://golang.org/pkg/fmt/).

Michael Vogt <mvogt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gflohr (Posted a comment)
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by mvogt (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-02 haible CategoryProgrammer tools Other
    2018-01-02 haible Severity3 - Normal 4 - Important
        StatusNone Confirmed
    2018-01-02 haible CategoryNone Programmer tools

    Back to the top

    Powered by Savane 3.9