After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754962 - [PATCH] Add custom directory files
[PATCH] Add custom directory files
Status: RESOLVED FIXED
Product: gnome-flashback
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Flashback Maintainers
GNOME Flashback Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-13 15:13 UTC by Balló György
Modified: 2015-09-14 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add custom directory files (3.95 KB, patch)
2015-09-13 15:13 UTC, Balló György
none Details | Review
Add custom directory files v2 (4.11 KB, patch)
2015-09-13 19:22 UTC, Balló György
none Details | Review
Rename session.in files (3.94 KB, patch)
2015-09-13 19:23 UTC, Balló György
none Details | Review

Description Balló György 2015-09-13 15:13:34 UTC
Created attachment 311232 [details] [review]
Add custom directory files

Settings.directory and Settings-System.directory are removed from gnome-menus:
https://git.gnome.org/browse/gnome-menus/commit/?id=b68bcd27f44ce2c494f6e3cd9695890b9c02af04


Note that currently session and directory files are not detected properly, when I run 'make gnome-flashback.pot-update', so they left untranslated, and I don't know how to fix it:

/usr/bin/xgettext: warning: file 'data/gnome-flashback-compiz.session.in' extension 'session' is unknown; will try C
/usr/bin/xgettext: warning: file 'data/gnome-flashback-metacity.session.in' extension 'session' is unknown; will try C
/usr/bin/xgettext: warning: file 'data/X-GNOME-Flashback-Settings.directory.in' extension 'directory' is unknown; will try C
/usr/bin/xgettext: warning: file 'data/X-GNOME-Flashback-Settings-System.directory.in' extension 'directory' is unknown; will try C
Comment 1 Alberts Muktupāvels 2015-09-13 18:35:05 UTC
Why these directory files are needed?

I think that can be fixed by changing *.session.in to *session.desktop.in and *.directory.in to *directory.desktop.in.
Comment 2 Balló György 2015-09-13 18:40:04 UTC
> Why these directory files are needed?

Without these directory files, we can't set an icon, and the name cannot be translated.

> I think that can be fixed by changing *.session.in to *session.desktop.in
> and *.directory.in to *directory.desktop.in.

Yes, renaming the files solves the problem probably.
Comment 3 Alberts Muktupāvels 2015-09-13 18:44:52 UTC
Ok. Can you update patch? And maybe create another to rename session files?
Comment 4 Balló György 2015-09-13 19:22:35 UTC
Created attachment 311239 [details] [review]
Add custom directory files v2

Updated patch, now the file format is detected properly by xgettext.
Comment 5 Balló György 2015-09-13 19:23:26 UTC
Created attachment 311240 [details] [review]
Rename session.in files

After that xgettext will detect the correct file format, and makes the files translatable.
Comment 6 Balló György 2015-09-13 19:55:20 UTC
After the second patch, some random text added to the end of RequiredComponents line, but I have no idea, why. It breaks login, so don't apply it yet.
Comment 7 Balló György 2015-09-13 20:46:00 UTC
I have no idea what is the problem with the second patch, it truncates the RequiredComponents line, but it's not really needed, because session files are translated anyway somehow.

So please apply the first patch, and ignore the second patch.
Comment 8 Alberts Muktupāvels 2015-09-14 02:18:19 UTC
(In reply to György Balló from comment #6)
> After the second patch, some random text added to the end of
> RequiredComponents line, but I have no idea, why. It breaks login, so don't
> apply it yet.

It works for me. What gettext version do you have?
Comment 9 Balló György 2015-09-14 06:19:12 UTC
> What gettext version do you have?

I'm using gettext 0.19.5.1, and it simply truncates the RequiredComponents line after 100 characters after my second patch.
Comment 10 Alberts Muktupāvels 2015-09-14 13:58:16 UTC
(In reply to György Balló from comment #9)
> > What gettext version do you have?
> 
> I'm using gettext 0.19.5.1, and it simply truncates the RequiredComponents
> line after 100 characters after my second patch.

Do we need .session files translated? Is that visible to user?
Comment 11 Balló György 2015-09-14 14:07:38 UTC
> Do we need .session files translated? Is that visible to user?

I think it's not visible anywhere, these session files are just used internally by gnome-session. The session name is available in the corresponding desktop files, which are used by display managers.
Comment 12 Alberts Muktupāvels 2015-09-14 14:24:19 UTC
I pushed your patch with updated commit message. Thanks!