bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] Support extracting named attribute parameters from C# usin


From: Robert Jørgensgaard Engdahl
Subject: [bug-gettext] Support extracting named attribute parameters from C# using xgettext
Date: Mon, 11 Mar 2019 15:53:58 +0100

This is as much a feature-request as it is a bug report.

In C# one could write code like

```
[DisplayFormat(FormatString="Duration in minutes|{0:n0} min")]
public decimal DurationMinutes {get;set;}
```

and I would like the string "{0:n0} min" to be extracted as a msgid and "Duration in minutes" as msgctxt (GNOME glib context syntax is a practical approach when enhancing existing frameworks).

In C# preprocessor directives aren't as expressive as they are in C, so unfortunately

```
[DisplayFormat(FormatString=Noop("Duration in minutes|{0:n0} min"))]
public decimal DurationMinutes {get;set;}
```

will not compile.

I am using gettext in WPF (a bit late for that platform) and I am dedicated to make that a painless experience https://github.com/robert-j-engdahl/ngettext-wpf

I have some experience with C, and GNU tools, but have never contributed to any open-source C projects.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]