Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent direction on translation tagging #134

Closed
davesteele opened this issue Sep 6, 2017 · 6 comments
Closed

Inconsistent direction on translation tagging #134

davesteele opened this issue Sep 6, 2017 · 6 comments

Comments

@davesteele
Copy link
Contributor

The documentation is inconsistent on how to tag description fields for translation. In one place, it says to translate by <p>aragraph. In another, it says to translate at the <description> level.

I used <_p> in a component description. It is ignored by intltool.

@ximion
Copy link
Owner

ximion commented Sep 6, 2017

The parts of the documentation you linked describe different parts of AppStream. In metainfo files, the paragraphs are translated, in collection metadata the full description tag is translated.
It even says that very explicitly in the sentence you marked ;-)

Intltool not incorporating your translation is likely a different bug. I can maybe help with that if you show me your project or an example of what doesn't work.
If you can use a recent version of (x)gettext, you can also ditch intltool completely, as it is not needed anymore.

@ximion ximion closed this as completed Sep 6, 2017
@davesteele
Copy link
Contributor Author

@ximion
Copy link
Owner

ximion commented Sep 9, 2017

The file itself looks fine, I only get these validation issues:

I - gnome-gmail.appdata.xml:gnome-gmail.desktop:4
    The id tag for "gnome-gmail.desktop" still contains a 'type' property, probably 
    from an old conversion.

W - gnome-gmail.appdata.xml:gnome-gmail.desktop:4
    The component ID is not a reverse domain-name. Please update the ID and that of 
    the accompanying .desktop file to follow the latest version of the Desktop-Entry 
    and AppStream specifications and avoid future issues.

Validation failed: warnings: 1, infos: 1

(you might want to fix those - if you change the ID, you will want to add a <launchable/> tag, so your app is still launchable)

I don't know exactly what is wrong with itstool, that should just work like that. However, it might be a good idea in general to switch to modern Gettext instead at this point. If you remove all the itstool underscore markings, and just run xgettext gnome-gmail.appdata.xml -o /tmp/test.pot it will do the right thing (if it doesn't, your xgettext is too old and you don't have AppStream installed - newer Gettext versions won't need AppStream to be installed).

@davesteele
Copy link
Contributor Author

Well ... Ok.

That gives me a pot file with different tag names for appdata strings (e.g. "#: gnome-gmail.appdata.xml.in:9" vs "#: ../gnome-gmail.appdata.xml.in.h:3").

I question why this is significant, since other strings in the file are being successfully translated.

I wrote this a couple of years ago to attempt to navigate the opacity of each environment. Using it now to generate the po's via gettext, I find:

  • not all files are processed when using '-f POTFILES.in' - I have to specify the files on the command line
  • the strings generated this way don't have useful tags

Furthermore, regardless of the input, I get no translations in .in files - a regression.

Conclusions

  • I still suspect that "description" is the thing to tag against.
  • Users will need to accept untranslated descriptions.

I appreciate your attention on this.

@davesteele
Copy link
Contributor Author

davesteele commented Oct 12, 2017 via email

@ximion
Copy link
Owner

ximion commented Oct 12, 2017

Eww, right, that page should be updated. Using only Xgettext is sufficient now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants