Skip to content

Commit

Permalink
Make .desktop and AppStream files translatable
Browse files Browse the repository at this point in the history
Also rename the project to "Fusion Icon" in these files.
  • Loading branch information
XRevan86 committed Dec 8, 2017
1 parent 9c598b8 commit 89f4214
Show file tree
Hide file tree
Showing 13 changed files with 216 additions and 46 deletions.
25 changes: 0 additions & 25 deletions MANIFEST

This file was deleted.

12 changes: 12 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include po/*
include COPYING NEWS README.md VERSION
include fusion-icon
include fusion-icon.desktop.in fusion-icon.appdata.xml.in
exclude fusion-icon.desktop fusion-icon.appdata.xml
include FusionIcon/*.py
include FusionIcon/interface_qt/__init__.py
include FusionIcon/interface_qt/main.py.in
include FusionIcon/interface_gtk/__init__.py
include FusionIcon/interface_gtk/main.py.in
include Makefile MANIFEST.in
recursive-include images *
15 changes: 0 additions & 15 deletions fusion-icon.appdata.xml

This file was deleted.

17 changes: 17 additions & 0 deletions fusion-icon.appdata.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 Sorokin Alexei <[email protected]> -->
<component type="desktop">
<id type="desktop">fusion-icon.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<_name>Fusion Icon</_name>
<_summary>Start and manage Compiz</_summary>
<description>
<_p>
This package provides a tray icon that allows you to easily enable,
disable and restart Compiz, and change the currently used window
manager and/or window decorator.
</_p>
</description>
<url type="homepage">https://github.com/compiz-reloaded/fusion-icon</url>
</component>
4 changes: 2 additions & 2 deletions fusion-icon.desktop → fusion-icon.desktop.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=Compiz Fusion Icon
Comment=Start and manage Compiz
_Name=Fusion Icon
_Comment=Start and manage Compiz
Exec=fusion-icon
Icon=fusion-icon
Terminal=false
Expand Down
4 changes: 4 additions & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Set of available languages. Keep it alphabatical. One lingua per line.
en_GB
ca
ru
42 changes: 42 additions & 0 deletions po/Makevars
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Makefile variables for PO directory in any package using GNU gettext.

# Usually the message domain is the same as the package name.
DOMAIN = fusion-icon

# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --no-location

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = github.com/compiz-reloaded

# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = https://github.com/compiz-reloaded/fusion-icon/issues


# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
2 changes: 2 additions & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fusion-icon.appdata.xml.in
fusion-icon.desktop.in
30 changes: 30 additions & 0 deletions po/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Catalan translation for fusion-icon
# Copyright (C) 2017 github.com/compiz-reloaded
# This file is distributed under the same license as the fusion-icon package.
# Robert Antoni Buj Gelonch <[email protected]>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: fusion-icon\n"
"Report-Msgid-Bugs-To: https://github.com/compiz-reloaded/fusion-icon/issues\n"
"POT-Creation-Date: 2017-12-08 15:59+0300\n"
"PO-Revision-Date: 2017-12-08 15:59+0300\n"
"Last-Translator: Robert Antoni Buj Gelonch <[email protected]>\n"
"Language-Team: Catalan <[email protected]>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Fusion Icon"
msgstr ""

msgid "Start and manage Compiz"
msgstr ""

msgid ""
"This package provides a tray icon that allows one to easily enable, disable "
"and restart Compiz, and change the currently used window manager and/or "
"window decorator."
msgstr ""
31 changes: 31 additions & 0 deletions po/en_GB.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# English (United Kingdom) translation for fusion-icon
# Copyright (C) 2017 github.com/compiz-reloaded
# This file is distributed under the same license as the fusion-icon package.
#
msgid ""
msgstr ""
"Project-Id-Version: fusion-icon\n"
"Report-Msgid-Bugs-To: https://github.com/compiz-reloaded/fusion-icon/issues\n"
"POT-Creation-Date: 2017-12-08 15:59+0300\n"
"PO-Revision-Date: 2017-12-08 15:59+0300\n"
"Last-Translator: Alexei Sorokin <[email protected]>\n"
"Language-Team: English (United Kingdom) <[email protected]>\n"
"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Fusion Icon"
msgstr "Fusion Icon"

msgid "Start and manage Compiz"
msgstr "Start and manage Compiz"

msgid ""
"This package provides a tray icon that allows one to easily enable, disable "
"and restart Compiz, and change the currently used window manager and/or "
"window decorator."
msgstr ""
"This package provides a tray icon that allows one to easily enable, disable "
"and restart Compiz, and change the currently used window manager and/or "
"window decorator."
30 changes: 30 additions & 0 deletions po/fusion-icon.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/compiz-reloaded/fusion-icon/issues\n"
"POT-Creation-Date: 2017-12-08 15:59+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Fusion Icon"
msgstr ""

msgid "Start and manage Compiz"
msgstr ""

msgid ""
"This package provides a tray icon that allows one to easily enable, disable "
"and restart Compiz, and change the currently used window manager and/or "
"window decorator."
msgstr ""
34 changes: 34 additions & 0 deletions po/ru.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Russian translation for fusion-icon
# Copyright (C) 2017 github.com/compiz-reloaded
# This file is distributed under the same license as the fusion-icon package.
# Alexei Sorokin <[email protected]>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: fusion-icon\n"
"Report-Msgid-Bugs-To: https://github.com/compiz-reloaded/fusion-icon/issues\n"
"POT-Creation-Date: 2017-12-08 15:59+0300\n"
"PO-Revision-Date: 2017-12-08 15:59+0300\n"
"Last-Translator: Alexei Sorokin <[email protected]>\n"
"Language-Team: Russian <[email protected]>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

msgid "Fusion Icon"
msgstr "Fusion Icon"

msgid "Start and manage Compiz"
msgstr "Запуск и управление Compiz"

msgid ""
"This package provides a tray icon that allows one to easily enable, disable "
"and restart Compiz, and change the currently used window manager and/or "
"window decorator."
msgstr ""
"Сей пакет предоставляет значок в трее, который позволяет легко включать, "
"выключать и перезапускать Compiz, а ещё сменять используемый на данный "
"момент оконный менеджер и/или оконный декоратор."
16 changes: 12 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python

import sys, os
from stat import *
from distutils.core import setup
import os
import subprocess
import sys
from distutils.command.install import install as _install
from distutils.core import setup
from stat import *

INSTALLED_FILES = '.installed_files'

Expand Down Expand Up @@ -109,6 +110,13 @@ def run(self):

packages.extend(available_interfaces.values())

cmd = "intltool-merge -d -u po/ fusion-icon.desktop.in fusion-icon.desktop".split(" ")
proc = subprocess.Popen(cmd)
proc.wait()

cmd = "intltool-merge -x -u po/ fusion-icon.appdata.xml.in fusion-icon.appdata.xml".split(" ")
proc = subprocess.Popen(cmd)
proc.wait()

data_files = [
('share/icons/hicolor/22x22/apps',['images/22x22/fusion-icon.png']),
Expand Down

0 comments on commit 89f4214

Please sign in to comment.