Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Brötzmann <mailtrash@posteo.de>2020-05-12 12:33:54 +0300
committerDaniel Brötzmann <mailtrash@posteo.de>2020-05-12 12:33:54 +0300
commitacba4b6993a0de630d504f165d0596d7b726c349 (patch)
tree8c0ece3847ec7f44e584b91e307a427c3cb02723 /plugins_translations
parentf0b51baa75b6ff0191eb0a7aa7494673addd1d42 (diff)
[plugins_translations] Update translations
Diffstat (limited to 'plugins_translations')
-rw-r--r--plugins_translations/de.mobin42339 -> 32629 bytes
-rw-r--r--plugins_translations/fr.mobin25721 -> 16308 bytes
-rw-r--r--plugins_translations/nl.mobin38934 -> 18264 bytes
-rw-r--r--plugins_translations/nl_BE.mobin39127 -> 18268 bytes
-rw-r--r--plugins_translations/plugins_translations.py31
5 files changed, 16 insertions, 15 deletions
diff --git a/plugins_translations/de.mo b/plugins_translations/de.mo
index 6aa1f2b..e2db7ca 100644
--- a/plugins_translations/de.mo
+++ b/plugins_translations/de.mo
Binary files differ
diff --git a/plugins_translations/fr.mo b/plugins_translations/fr.mo
index e19f5d6..121058e 100644
--- a/plugins_translations/fr.mo
+++ b/plugins_translations/fr.mo
Binary files differ
diff --git a/plugins_translations/nl.mo b/plugins_translations/nl.mo
index 4f0cbf4..1681bf6 100644
--- a/plugins_translations/nl.mo
+++ b/plugins_translations/nl.mo
Binary files differ
diff --git a/plugins_translations/nl_BE.mo b/plugins_translations/nl_BE.mo
index 6929af7..8b8869d 100644
--- a/plugins_translations/nl_BE.mo
+++ b/plugins_translations/nl_BE.mo
Binary files differ
diff --git a/plugins_translations/plugins_translations.py b/plugins_translations/plugins_translations.py
index 75e837f..e54006b 100644
--- a/plugins_translations/plugins_translations.py
+++ b/plugins_translations/plugins_translations.py
@@ -1,26 +1,24 @@
-# -*- coding: utf-8 -*-
-##
-
+import logging
import os
from gajim.common import configpaths
+
from gajim.plugins import GajimPlugin
-from gajim.plugins.helpers import log_calls
from gajim.plugins.plugins_i18n import _
+log = logging.getLogger('gajim.p.plugins_translations')
-class PluginsTranslationsPlugin(GajimPlugin):
- @log_calls('PluginsTranslationsPlugin')
+class PluginsTranslationsPlugin(GajimPlugin):
def init(self):
- self.description = _('This plugin contains translation files '
- 'for Gajim plugins')
+ self.description = _('This plugin contains translations for other '
+ 'Gajim plugins. Please restart Gajim after '
+ 'enabling this plugin.')
self.config_dialog = None
self.config_default_values = {'last_version': '0'}
self.locale_dir = os.path.join(
configpaths.get('PLUGINS_USER'), 'locale')
- @log_calls('PluginsTranslationsPlugin')
def activate(self):
if self.config['last_version'] == self.version:
return
@@ -30,25 +28,28 @@ class PluginsTranslationsPlugin(GajimPlugin):
files = glob(self.__path__ + '/*.mo')
# remove old data
- self.remove_translations()
+ self._remove_translations()
# create dirs and copy files
os.mkdir(self.locale_dir)
- locales = [os.path.splitext(os.path.basename(name))[0] for name in files]
+ locales = [
+ os.path.splitext(os.path.basename(name))[0] for name in files
+ ]
+ log.info('Installing new translations...')
for locale in locales:
dst = os.path.join(os.path.join(self.locale_dir, locale),
- 'LC_MESSAGES/gajim_plugins.mo')
+ 'LC_MESSAGES/gajim_plugins.mo')
os.makedirs(os.path.split(dst)[0])
shutil.copy2(os.path.join(self.__path__, '%s.mo' % locale), dst)
self.config['last_version'] = self.version
- def remove_translations(self):
+ def _remove_translations(self):
+ log.info('Removing old translations...')
if os.path.isdir(self.locale_dir):
import shutil
shutil.rmtree(self.locale_dir)
- @log_calls('PluginsTranslationsPlugin')
def deactivate(self):
- self.remove_translations()
+ self._remove_translations()
self.config['last_version'] = '0'