ruby-gettext / gettext

Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
https://ruby-gettext.github.io/
69 stars 28 forks source link

gettext ignores property with translator comments in glade-files #74

Closed dorle-o closed 3 years ago

dorle-o commented 4 years ago

In a glade-file comments for translators can be set via

 <property name="text" translatable="yes" comments="comment for translator">Text</property>

The glade parser doesn't store the comments and even ignores translatable properties with comments. This is due to the restrictive regexp in: https://github.com/ruby-gettext/gettext/blob/4874599a63c6bfc69b74f063b8e556cd7bd5da88/lib/gettext/tools/parser/glade.rb#L44

kou commented 4 years ago

Why do you use old .glade file instead of new .ui file?

dorle-o commented 4 years ago

I'm using glade v.3.20.4 and it stores all files automatically as .glade. Can you point me to a documentation of the .glade and .ui files? Where is the difference? And why is it important for this issue?

kou commented 3 years ago

Sorry. I misunderstood. Glade uses https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI format but it still uses .glade not .ui for extension.

I've added support for GtkBuilder UI definitions format with .glade extension.