macaw-ruby 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +66 -0
- data/bin/macaw +1 -1
- data/lib/macaw/i18n/de.yml +5 -9
- data/lib/macaw/i18n/es.yml +6 -10
- data/lib/macaw/i18n/fr.yml +5 -9
- data/lib/macaw/i18n/ru.yml +5 -9
- data/lib/macaw/version.rb +1 -1
- metadata +1 -2
- data/lib/macaw/i18n/nl.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9be3ed264551d27b6cc2d0d0b8961985c7f97a8
|
4
|
+
data.tar.gz: 9c8a41cba686576e6ca81f5de338d15b8f738abe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fb645b1a34f5c5df1e4e5f23538e0fcba20c9624aeb9459a818aa08bdd6907683ddfae1d80f7985343d190b5c25f001add8098bc06ef985b82aa2cd3c384ae9
|
7
|
+
data.tar.gz: ed7cf1556424f7fea003e880cc45a1136cb91fe30c887cbf20217f4432948f54fcbc2f654ca3d991db8afd0df3b55e1af687b7061c3ff76b9b8434be5a3319fb
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
2
|
require 'fileutils'
|
3
|
+
require 'yaml'
|
4
|
+
require 'pp'
|
3
5
|
|
4
6
|
task :default => :build
|
5
7
|
|
@@ -24,3 +26,67 @@ task :test do
|
|
24
26
|
sh "./bin/macaw -p -l"
|
25
27
|
sh "rm test.*"
|
26
28
|
end
|
29
|
+
|
30
|
+
|
31
|
+
class LanguageManager
|
32
|
+
class NoTranslation < StandardError; end
|
33
|
+
|
34
|
+
def initialize
|
35
|
+
@translations = {}
|
36
|
+
Dir['lib/macaw/i18n/*.yml'].each{|yml|
|
37
|
+
@translations[File.basename(yml, File.extname(yml))] = YAML.load_file(yml)
|
38
|
+
}
|
39
|
+
@en = @translations.delete('en')
|
40
|
+
@keys = keys(@en[@en.keys[0]])
|
41
|
+
end
|
42
|
+
|
43
|
+
def keys(h, prefix=[])
|
44
|
+
c = []
|
45
|
+
h.each_pair{|k, v|
|
46
|
+
if v.is_a?(Hash)
|
47
|
+
c += keys(v, prefix + [k])
|
48
|
+
else
|
49
|
+
c << prefix + [k]
|
50
|
+
end
|
51
|
+
}
|
52
|
+
c
|
53
|
+
end
|
54
|
+
|
55
|
+
def resolve(h, k)
|
56
|
+
raise NoTranslation if h.nil?
|
57
|
+
h = h[k.shift]
|
58
|
+
return h if k.empty?
|
59
|
+
return resolve(h, k)
|
60
|
+
end
|
61
|
+
|
62
|
+
def vars(s)
|
63
|
+
v = []
|
64
|
+
s.gsub(/%\{([^}]+)\}/){|k| v << k}
|
65
|
+
return v.sort
|
66
|
+
end
|
67
|
+
|
68
|
+
def test
|
69
|
+
@translations.values.each{|l|
|
70
|
+
@keys.each{|k|
|
71
|
+
ens = resolve(@en[@en.keys[0]], k.dup)
|
72
|
+
ls = nil
|
73
|
+
begin
|
74
|
+
ls = resolve(l[l.keys[0]], k.dup)
|
75
|
+
rescue NoTranslation
|
76
|
+
ls = nil
|
77
|
+
end
|
78
|
+
|
79
|
+
if ls.to_s == ''
|
80
|
+
puts "No translation: #{l.keys[0]}: #{k.join('.')}"
|
81
|
+
next
|
82
|
+
end
|
83
|
+
|
84
|
+
puts "Var mismatch: #{l.keys[0]}: #{k.join('.')}; #{vars(ens).inspect} vs #{vars(ls).inspect}" if vars(ens) != vars(ls)
|
85
|
+
}
|
86
|
+
}
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
task :tr do
|
91
|
+
LanguageManager.new.test
|
92
|
+
end
|
data/bin/macaw
CHANGED
@@ -234,7 +234,7 @@ class Macaw
|
|
234
234
|
end
|
235
235
|
|
236
236
|
def self.log(line, force=false)
|
237
|
-
print (options.progress && !force ? '.' : line
|
237
|
+
print (options.progress && !force ? '.' : line) if @@options.verbose || @@options.progress || force
|
238
238
|
@@log.write(line) if @@log
|
239
239
|
end
|
240
240
|
|
data/lib/macaw/i18n/de.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
de:
|
3
3
|
log:
|
4
4
|
WelcomeMessage: Willkommen zu arara %{0}!
|
5
|
-
ProcessingFile: Bearbeitung der Datei ''%{
|
5
|
+
ProcessingFile: Bearbeitung der Datei ''%{file}'', bitte warten.
|
6
6
|
Done: Fertig.
|
7
7
|
ExceptionRaised: 'Eine Ausnahme mit folgender Nachricht ist durch arara ausgelöst
|
8
8
|
worden:'
|
@@ -31,13 +31,9 @@ de:
|
|
31
31
|
Slogan: Das coole TeX Automatisierungstool
|
32
32
|
AllRightsReserved: Alle Rechte vorbehalten!
|
33
33
|
msg:
|
34
|
-
NoDirectivesFound: Ich habe keine Anweisungen in ''%{
|
34
|
+
NoDirectivesFound: Ich habe keine Anweisungen in ''%{file}'' gefunden und daher nichts
|
35
35
|
getan. Ist es das, was du wirklich wolltest.
|
36
|
-
SpecialThanks: Ein besonderes Danke geht an
|
37
|
-
Christopher Hughes, Clemens Niederberger, David Carlisle, Enrico Gregorio, Francesco
|
38
|
-
Endrici, Gonzalo Medina, Harish Kumar, Heiko Oberdiek, İlhan Polat, Joseph Wright,
|
39
|
-
Marco Daniel, Mikaël Maunier, Nicola Talbot, Patrick Gundlach, Rasmus Roulund,
|
40
|
-
Sergey Ulyanov, Stefan Kottwitz und viele andere, die dieses bescheidene Tool
|
36
|
+
SpecialThanks: Ein besonderes Danke geht an %{contributors} und viele andere, die dieses bescheidene Tool
|
41
37
|
ermöglichten.
|
42
38
|
RunningCommand: Verarbeite %{0}...
|
43
39
|
Success: ERFOLGREICH
|
@@ -54,7 +50,7 @@ de:
|
|
54
50
|
Dateiendungen in der Reihenfolge %{1} zu suchen. Du kannst die Reihenfolge bzw.
|
55
51
|
das Suchmuster ändern oder sogar neue Dateiendung hinzufügen. Bitte konsolidiere
|
56
52
|
die Dokumentation, um mehr über dieses und andere Features zu erfahren.
|
57
|
-
FileDoesNotExist: Datei ''%{
|
53
|
+
FileDoesNotExist: Datei ''%{file}'' existiert nicht.
|
58
54
|
CommandNotFound: Es tut mir Leid, aber die Anweisung der Aufgabe ''%{0}'' konnte
|
59
55
|
nicht gefunden werden. Bist du dir sicher, dass die Anweisung ''%{1}'' korrekt
|
60
56
|
oder über die Systempfade zugänglich ist?
|
@@ -68,7 +64,7 @@ de:
|
|
68
64
|
bereitgestellt wird.
|
69
65
|
InvalidLanguageConfigurationFile: 'Housten, wir haben ein Problem. Leider ist
|
70
66
|
die in der Konfigurationsdatei spezifizierte Sprache nicht zulässig. Momentan
|
71
|
-
kann arara die folgenden Sprachen unterstützen: %{
|
67
|
+
kann arara die folgenden Sprachen unterstützen: %{languages}. Stelle sicher, dass eine
|
72
68
|
gültige Sprache gewählt wird oder entferne den Eintrag aus deiner Konfigurationsdatei
|
73
69
|
(der Sprachschlüssel ist optional), ansonsten kann arara nicht ausgeführt werden.'
|
74
70
|
InvalidFiletypesConfigurationFile: Es tut mir Leid, aber es scheint, dass du eine
|
data/lib/macaw/i18n/es.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
es:
|
3
3
|
log:
|
4
4
|
WelcomeMessage: ''
|
5
|
-
ProcessingFile: Procesando el archivo '
|
5
|
+
ProcessingFile: Procesando el archivo '%{file}', por favor espere.
|
6
6
|
Done: Listo.
|
7
7
|
ExceptionRaised: 'Arara generó una excepción con el siguiente mensaje:'
|
8
8
|
ReadyToRunCommands: Listo para ejecutar comandos.
|
@@ -16,7 +16,7 @@ es:
|
|
16
16
|
%{1}"
|
17
17
|
DirectiveFound: Directiva encontrada en la línea %{0} con %{1}.
|
18
18
|
RuleFound: Tarea ''%{0}'' encontrada en ''%{1}''.
|
19
|
-
NoDirectivesFound: No se encontraron directivas en '
|
19
|
+
NoDirectivesFound: No se encontraron directivas en '%{0}'.
|
20
20
|
help:
|
21
21
|
Version: imprime la versión de la aplicación
|
22
22
|
Help: imprime el mensaje de ayuda
|
@@ -30,13 +30,9 @@ es:
|
|
30
30
|
Slogan: The cool TeX automation tool
|
31
31
|
AllRightsReserved: Todos los derechos reservados.
|
32
32
|
msg:
|
33
|
-
NoDirectivesFound: No encontré directivas en '
|
33
|
+
NoDirectivesFound: No encontré directivas en '%{file}', por lo que no ejecuté ninguna
|
34
34
|
acción. ¿Era esto lo que realmente deseaba?
|
35
|
-
SpecialThanks: Un agradecimiento especial a
|
36
|
-
Christopher Hughes, Clemens Niederberger, David Carlisle, Enrico Gregorio, Francesco
|
37
|
-
Endrici, Gonzalo Medina, Harish Kumar, Heiko Oberdiek, İlhan Polat, Joseph Wright,
|
38
|
-
Marco Daniel, Mikaël Maunier, Nicola Talbot, Patrick Gundlach, Rasmus Roulund,
|
39
|
-
Sergey Ulyanov, Stefan Kottwitz, y a muchos otros por hacer posible esta herramienta.
|
35
|
+
SpecialThanks: Un agradecimiento especial a %{contributors}, y a muchos otros por hacer posible esta herramienta.
|
40
36
|
RunningCommand: Ejecutando %{0}...
|
41
37
|
Success: "ÉXITO"
|
42
38
|
Failure: FALLO
|
@@ -53,7 +49,7 @@ es:
|
|
53
49
|
en ese orden. El orden y los patrones de búsqueda se pueden modificar, incluso
|
54
50
|
se puede agregar soporte para nuevas extensiones, utilizando el archivo de configuración.
|
55
51
|
Por favor consulte el manual de arara para mayor información.
|
56
|
-
FileDoesNotExist: El archivo '
|
52
|
+
FileDoesNotExist: El archivo '%{file}' no existe.
|
57
53
|
CommandNotFound: "\\nLo siento, pero el comando para la tarea ''%{0}'' no se encontró.
|
58
54
|
Asegúrese de que el comando ''%{1}'' sea correcto y accesible desde la ruta
|
59
55
|
(''path'') del sistema."
|
@@ -67,7 +63,7 @@ es:
|
|
67
63
|
no puede continuar a menos que el archivo de configuración sea correcto."
|
68
64
|
InvalidLanguageConfigurationFile: "!Houston, tenemos un problema! Lamentablemente,
|
69
65
|
el idioma configurado en el archivo de configuración no es válido. Actualemente
|
70
|
-
arara soporta los siguientes idiomas: %{
|
66
|
+
arara soporta los siguientes idiomas: %{languages}. Asegúrese de escoger un idioma válido
|
71
67
|
o suprima la entrada del archivo de configuración (el campo es opcional), de
|
72
68
|
lo contrario, arara no podrá continuar."
|
73
69
|
InvalidFiletypesConfigurationFile: Lo siento, pero parece que el archivo de configuración
|
data/lib/macaw/i18n/fr.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
fr:
|
3
3
|
log:
|
4
4
|
WelcomeMessage: ''
|
5
|
-
ProcessingFile: Traitement du fichier ''%{
|
5
|
+
ProcessingFile: Traitement du fichier ''%{file}'', veuillez patienter.
|
6
6
|
Done: Terminé.
|
7
7
|
ExceptionRaised: 'Arara a généré une erreur avec le message suivant :'
|
8
8
|
ReadyToRunCommands: Prêt à executer des commandes.
|
@@ -16,7 +16,7 @@ fr:
|
|
16
16
|
: %{1}"
|
17
17
|
DirectiveFound: Instruction trouvée à la ligne %{0} avec %{1}.
|
18
18
|
RuleFound: Tâche ''%{0}'' trouvée dans ''%{1}''.
|
19
|
-
NoDirectivesFound: Aucune instructions trouvées dans ''%{
|
19
|
+
NoDirectivesFound: Aucune instructions trouvées dans ''%{file}''.
|
20
20
|
help:
|
21
21
|
Version: affiche la version de l'application
|
22
22
|
Help: affiche le message d'aide
|
@@ -32,11 +32,7 @@ fr:
|
|
32
32
|
msg:
|
33
33
|
NoDirectivesFound: Je n''ai trouvé aucunes instructions dans ''%{0}'', aussi n''ai-je
|
34
34
|
rien fait. Est-ce réellment ce que vous vouliez ?
|
35
|
-
SpecialThanks: Un remerciement spécial pour
|
36
|
-
Christopher Hughes, Clemens Niederberger, David Carlisle, Enrico Gregorio, Francesco
|
37
|
-
Endrici, Gonzalo Medina, Harish Kumar, Heiko Oberdiek, İlhan Polat, Joseph Wright,
|
38
|
-
Marco Daniel, Mikaël Maunier, Nicola Talbot, Patrick Gundlach, Rasmus Roulund,
|
39
|
-
Sergey Ulyanov, Stefan Kottwitz, et de nombreux autres qui ont rendu possible
|
35
|
+
SpecialThanks: Un remerciement spécial pour %{contributors}, et de nombreux autres qui ont rendu possible
|
40
36
|
la création de cet humble outil.
|
41
37
|
RunningCommand: Execution de %{0}...
|
42
38
|
Success: SUCCÈS
|
@@ -54,7 +50,7 @@ fr:
|
|
54
50
|
pouvez modifier l''ordre, le motif pour la recherche ou même ajouter de nouvelles
|
55
51
|
extensions par le biais du fichier de configuration. Merci de vous référer au
|
56
52
|
manuel d'arara pour en apprendre plus sur cette caractéristique.
|
57
|
-
FileDoesNotExist: Le fichier ''%{
|
53
|
+
FileDoesNotExist: Le fichier ''%{file}'' n''existe pas.
|
58
54
|
CommandNotFound: "\\nJe suis navré, mais la commande en provenance de la tâche
|
59
55
|
''%{0}'' n''a pas été trouvée. Êtes-vous sur(e) que la commande ''%{1}'' est
|
60
56
|
correcte et accessible depuis le PATH ?"
|
@@ -68,7 +64,7 @@ fr:
|
|
68
64
|
pas continuer tant qu'un fichier de configuration correct ne sera pas disponible.
|
69
65
|
InvalidLanguageConfigurationFile: 'Houston, nous avons un problème. C''''est triste
|
70
66
|
à dire mais le langage définit dans le fichier de configuration est incorrect.
|
71
|
-
Pour l''''instant, arara supporte les langages suivants : %{
|
67
|
+
Pour l''''instant, arara supporte les langages suivants : %{languages}. Soyez sur(e)
|
72
68
|
de choisir un langage correct ou de retirer l''''entrée du fichier de configuration
|
73
69
|
(le champ est optionnel), sinon arara ne pourra pas continuer.'
|
74
70
|
InvalidFiletypesConfigurationFile: Je suis navré mais il semble que votre fichier
|
data/lib/macaw/i18n/ru.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
ru:
|
3
3
|
log:
|
4
4
|
WelcomeMessage: "Добро пожаловать в arara %{0}!"
|
5
|
-
ProcessingFile: "Обработка файла '
|
5
|
+
ProcessingFile: "Обработка файла '%{file}', пожалуйста, подождите."
|
6
6
|
Done: "Завершено."
|
7
7
|
ExceptionRaised: 'Arara выдала исключение со следующим сообщением:'
|
8
8
|
ReadyToRunCommands: "Готов к запуску команд."
|
@@ -29,13 +29,9 @@ ru:
|
|
29
29
|
Slogan: "Крутой инструмент автоматизации TeX"
|
30
30
|
AllRightsReserved: "Все права защищены."
|
31
31
|
msg:
|
32
|
-
NoDirectivesFound: "Я не могу найти ни одной директивы в '
|
32
|
+
NoDirectivesFound: "Я не могу найти ни одной директивы в '%{file}', и поэтому не
|
33
33
|
могу ничего выполнить. Это действительно то, что вы хотели?"
|
34
|
-
SpecialThanks: "Особая благодарность выражается
|
35
|
-
Longborough, Christopher Hughes, Clemens Niederberger, David Carlisle, Enrico
|
36
|
-
Gregorio, Francesco Endrici, Gonzalo Medina, Harish Kumar, Heiko Oberdiek, İlhan
|
37
|
-
Polat, Joseph Wright, Marco Daniel, Mikaël Maunier, Nicola Talbot, Patrick Gundlach,
|
38
|
-
Rasmus Roulund, Sergey Ulyanov, Stefan Kottwitz и многим другим, благодаря кому
|
34
|
+
SpecialThanks: "Особая благодарность выражается %{contributors} и многим другим, благодаря кому
|
39
35
|
стало возможным создание этого скромного инструмента."
|
40
36
|
RunningCommand: "Выполнение %{0}..."
|
41
37
|
Success: "УСПЕШНО"
|
@@ -53,7 +49,7 @@ ru:
|
|
53
49
|
порядок, образец поиска или даже добавить поддержку новых расщирений через файл
|
54
50
|
конфигурации. Пожалуйста, обратитесь к руководству arara, что бы узнать больше
|
55
51
|
об этой возможности."
|
56
|
-
FileDoesNotExist: "Файл '
|
52
|
+
FileDoesNotExist: "Файл '%{file}' не существует."
|
57
53
|
CommandNotFound: "= \\nК сожалению, команда из задачи ''%{0}'' не найдена. Вы
|
58
54
|
уверены, что команда ''%{1}'' корректна или же доступна из системного пути?"
|
59
55
|
InvalidYAMLConfigurationFile: "К сожалению, ваш файл конфигурации arara, по всей
|
@@ -65,7 +61,7 @@ ru:
|
|
65
61
|
работу, пока не будет предоставлен корректный файл конфигурации."
|
66
62
|
InvalidLanguageConfigurationFile: "Хьюстон, у нас проблема. К сожалению, язык,
|
67
63
|
установленный в файле конфигурации не является допустимым. В настоящее время
|
68
|
-
arara может предоставить поддержку следующих языков: %{
|
64
|
+
arara может предоставить поддержку следующих языков: %{languages}. Удостоверьтесь, что
|
69
65
|
выбран допустимый язык или запись удалена из конфигурационного файла (поле не
|
70
66
|
является обязательным), в противном случае arara не сможет продолжить работу."
|
71
67
|
InvalidFiletypesConfigurationFile: "К сожалению, видимо, в вашем файле конфигурации
|
data/lib/macaw/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macaw-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emiliano Heyns
|
@@ -129,7 +129,6 @@ files:
|
|
129
129
|
- lib/macaw/i18n/es.yml
|
130
130
|
- lib/macaw/i18n/fr.yml
|
131
131
|
- lib/macaw/i18n/it.yml
|
132
|
-
- lib/macaw/i18n/nl.yml
|
133
132
|
- lib/macaw/i18n/pt-BR.yml
|
134
133
|
- lib/macaw/i18n/pt.yml
|
135
134
|
- lib/macaw/i18n/ru.yml
|
data/lib/macaw/i18n/nl.yml
DELETED