n42translation 0.1.1

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.
@@ -0,0 +1,9 @@
1
+ require 'yaml'
2
+
3
+ module N42translation
4
+ class Strings
5
+ def self.createStrings(yaml)
6
+ return Array[yaml.map{|key,value| ["\"#{key}\" = \"#{value}\";"] }]
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module N42translation
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,47 @@
1
+ require 'yaml'
2
+ require 'write_xlsx'
3
+
4
+ module N42translation
5
+ class XLSX
6
+
7
+ def self.create(csv, output_path, project_name)
8
+ workbook = WriteXLSX.new(output_path)
9
+ worksheet = workbook.add_worksheet(project_name)
10
+
11
+ todo_format = workbook.add_format
12
+ todo_format.set_bold
13
+ todo_format.set_color('red')
14
+ todo_format.set_align('left')
15
+
16
+ default_format = workbook.add_format
17
+ default_format.set_color('black')
18
+ default_format.set_align('left')
19
+
20
+ bold_format = workbook.add_format
21
+ bold_format.set_bold
22
+
23
+ csv.each_with_index do |line, row_index|
24
+ contains_unfinished = line.any? {|translation| translation.include? "TODO: "}
25
+ line.each_with_index do |translation, col_index|
26
+ if contains_unfinished
27
+ # write first column red if a translation is missing in column
28
+ if col_index == 0 || (translation.include? "TODO: ")
29
+ worksheet.write(row_index, col_index, translation, todo_format)
30
+ else
31
+ worksheet.write(row_index, col_index, translation, default_format)
32
+ end
33
+ else
34
+ if col_index == 0 || row_index == 0
35
+ # write bold in first col & row
36
+ worksheet.write(row_index, col_index, translation, bold_format)
37
+ else
38
+ worksheet.write(row_index, col_index, translation, default_format)
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ workbook.close
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,28 @@
1
+ require 'yaml'
2
+ require 'builder'
3
+
4
+
5
+ module N42translation
6
+ class XML
7
+ def self.createXML(yaml)
8
+ return yaml_to_xml(yaml)
9
+ end
10
+
11
+ private
12
+ def self.yaml_to_xml(yaml)
13
+ xml = Builder::XmlMarkup.new( :indent => 2 )
14
+ xml.instruct! :xml, :encoding => "utf-8"
15
+ xml.resources do |r|
16
+ yaml.each do |name, value|
17
+ r.string("\"#{value}\"" ,:name => name)
18
+ end
19
+ end
20
+ return xml
21
+ end
22
+ end
23
+ end
24
+
25
+
26
+
27
+
28
+
@@ -0,0 +1,3 @@
1
+ build_path: "./builds"
2
+ source_path: "./"
3
+ project_name: "horsch"
@@ -0,0 +1 @@
1
+ ---
@@ -0,0 +1 @@
1
+ ---
@@ -0,0 +1,12 @@
1
+ ---
2
+ storage_access:
3
+ title: Kein externes Speichermedium
4
+ warning: Die Inhalte können nicht geladen werden, da Ihr Gerät kein externes Speichermedum
5
+ (SD-Karte oder eingebauten Speicher) besitzt.
6
+ b:
7
+ c:
8
+ d: blubb blubb2
9
+ second_warning: Another Warning
10
+ download_manager:
11
+ default_error: Beim Download ist ein Fehler aufgetreten. Bitte versuchen Sie es
12
+ später noch einmal.
@@ -0,0 +1,136 @@
1
+ ---
2
+ application:
3
+ navigation:
4
+ back: Zurück
5
+ appointment:
6
+ action:
7
+ send:
8
+ long: Stellen Sie eine Vorführanfrage
9
+ short: Anfrage
10
+ error:
11
+ email: Bitte geben Sie eine korrekte E-Mail-Adresse an
12
+ firstname: Bitte geben Sie Ihren Vornamen an.
13
+ lastname: Bitte geben Sie Ihren Nachnamen an
14
+ phone: Bitte geben Sie eine Telefonnummer an
15
+ privacy: Sie müssen den Datenschutzbestimmungen zustimmen
16
+ form:
17
+ desiredmonth: Monat
18
+ desiredyear: Jahr
19
+ email: E-Mail
20
+ firstname: Vorname
21
+ lastname: Nachname
22
+ phone: Telefon
23
+ privacy: Datenschutzbestimmung
24
+ privacyagreement: Ich habe die Datenschutzbestimmungen gelesen und stimme diesen
25
+ zu.
26
+ required: benötigt
27
+ section:
28
+ adress: Kontaktinformationen
29
+ desiredschedule: Bevorzugtes Datum
30
+ privacy: Datenschutzbestimmungen
31
+ success:
32
+ sent: Ihre Vorführanfrage wurde uns zugesandt.
33
+ detail:
34
+ action:
35
+ cancel: Abbrechen
36
+ done: Fertig
37
+ download: Prospekt herunterladen
38
+ ok: Ok
39
+ share_product_generic: Produkt teilen
40
+ share_product_fb: Produkt über Facebook teilen
41
+ share_product_tw: Produkt über Twitter teilen
42
+ download:
43
+ manager:
44
+ downloading: Herunterladen …
45
+ needspace: Sie benötigen mehr freien Speicher um die Inhalte herunterzuladen.
46
+ preparing: Vorbereiten …
47
+ home:
48
+ action:
49
+ appointment: Vorführung vereinbaren
50
+ delete: Löschen
51
+ order: Prospektbestellung
52
+ share_app_generic: App teilen
53
+ share_app_fb: App über Facebook teilen
54
+ share_app_tw: App über Twitter teilen
55
+ update:
56
+ error: Sie sind nicht mit dem Internet verbunden
57
+ message: Es sind neue Inhalte verfügbar
58
+ title: Download
59
+ delete:
60
+ information: Heruntergeladene Inhalte löschen
61
+ warning:
62
+ text: Wollen Sie wirklich alle heruntergeladenen Inhalte löschen?
63
+ title: Inhalte löschen
64
+ more:
65
+ information:
66
+ title: Sie suchen nach weiteren Informationen?
67
+ description: Bitte bestellen Sie einen Prospekt oder vereinbaren Sie eine Maschinenvorführung.
68
+ order:
69
+ action:
70
+ send:
71
+ long: Senden Sie mir die Prospekte kostenlos zu
72
+ short: 'Senden '
73
+ delivery:
74
+ email: per E-Mail
75
+ mail: auf dem Postweg
76
+ error:
77
+ city: Bitte geben Sie Ihren Wohnort an
78
+ country: Bitte wählen Sie ein Land aus
79
+ deliveryemail: Sie haben E-Mail Versand ausgewählt, aber nicht die entsprechenden
80
+ Datenschutzbestimmungen anerkannt.
81
+ deliverymail: Sie haben den Postweg ausgewählt, aber nicht die entsprechenden
82
+ Datenschutzbestimmungen anerkannt.
83
+ email: Bitte geben Sie eine korrekte E-Mail-Adresse an
84
+ firstname: Bitte geben Sie Ihren Vornamen an.
85
+ lastname: Bitte geben Sie Ihren Nachnamen an
86
+ nobrochure: Sie müssen mindestens einen Prospekt auswählen
87
+ nodelivery: Bitte geben Sie einen Zustellungsweg an
88
+ postalcode: Bitte geben Sie Ihre PLZ an
89
+ privacy: Sie müssen den Datenschutzbestimmungen zustimmen
90
+ street: Bitte geben Sie Ihre Straße an
91
+ form:
92
+ city: Wohnort
93
+ country: Land
94
+ email: E-Mail
95
+ firstname: Vorname
96
+ lastname: Nachname
97
+ postalcode: PLZ
98
+ privacy: Datenschutzbestimmungen
99
+ required: benötigt
100
+ street: Straße
101
+ section:
102
+ adress: Wohin sollen wir sie senden?
103
+ brochures: Wählen Sie die gewünschten Prospekte aus
104
+ delivery: Wie möchten Sie sie zugesandt bekommen?
105
+ privacy: Ich habe die Datenschutzbestimmungen bzgl. der Lieferung gelesen und
106
+ zugestimmt
107
+ success:
108
+ sent: Ihre Prospekte werden Ihnen zugesandt
109
+ settings:
110
+ about: Über
111
+ active_products:
112
+ title: Aktivierte Produkte
113
+ none: keine
114
+ reset: zurücksetzen
115
+ content_settings: Inhaltseinstellungen
116
+ delete_content: Inhalte vom Gerät löschen
117
+ download_videos: Videos herunterladen
118
+ event_mode_enabled: Messemodus aktiv
119
+ event_mode_settings: Einstellungen für Messemodus
120
+ imprint: Impressum
121
+ offline_news_requires_content_update: Die Neuigkeiten offline bereitzuhalten erfordert
122
+ eine Inhaltsaktualisierung
123
+ offline_news: Neuigkeiten offline bereithalten
124
+ preferred_languages: Bevorzugte Sprachen
125
+ privacy: Datenschutzbestimmungen
126
+ requires_content_update: erfordert Inhaltsaktualisierung
127
+ requires_downloading: Inhalte müssen neu heruntergeladen werden
128
+ screensaver_active: Bildschirmschoner aktiv
129
+ title: Einstellungen
130
+ video:
131
+ offline:
132
+ message: Verbinden Sie das Gerät mit dem Internet um Videos anzusehen.
133
+ title: Video ist nicht offline verfügbar
134
+ path:
135
+ to:
136
+ my_message: my new message
@@ -0,0 +1,11 @@
1
+ ---
2
+ storage_access:
3
+ title: No external Storage
4
+ warning: Can't download contents, as your device does not have an external storage
5
+ meidum (SD-Card or built-in storage).
6
+ b:
7
+ c:
8
+ d: blubb blubb2
9
+ second_warning: Another Warning
10
+ download_manager:
11
+ default_error: Download error occured. Please try again later.
@@ -0,0 +1,133 @@
1
+ ---
2
+ application:
3
+ navigation:
4
+ back: Back
5
+ appointment:
6
+ action:
7
+ send:
8
+ long: Make a request for a demonstration
9
+ short: Request
10
+ error:
11
+ email: Please fill in a correct e-mail address
12
+ firstname: Please fill in your first name
13
+ lastname: Please fill in your last name
14
+ phone: Please provide a phone number
15
+ privacy: You have to accept the privacy agreement
16
+ form:
17
+ desiredmonth: Month
18
+ desiredyear: Year
19
+ email: E-mail
20
+ firstname: First name
21
+ lastname: Last name
22
+ phone: Phone
23
+ privacy: privacy agreement
24
+ privacyagreement: I have read and accepted the privacy agreement
25
+ required: required
26
+ section:
27
+ adress: Contact information
28
+ desiredschedule: Preferred date
29
+ privacy: Privacy
30
+ success:
31
+ sent: Your request for a demonstration has been sent.
32
+ detail:
33
+ action:
34
+ cancel: Cancel
35
+ done: Done
36
+ download: Download Brochure
37
+ ok: Ok
38
+ share_product_generic: Share Product
39
+ share_product_fb: Share Product via Facebook
40
+ share_product_tw: Share Product via Twitter
41
+ download:
42
+ manager:
43
+ downloading: Downloading …
44
+ needspace: You need more free space to download the content.
45
+ preparing: Preparing …
46
+ home:
47
+ action:
48
+ appointment: Make an appointment for a demonstration
49
+ delete: Delete
50
+ order: Brochure order
51
+ share_app_generic: Share App
52
+ share_app_fb: Share App via Facebook
53
+ share_app_tw: Share App via Twitter
54
+ update:
55
+ error: You are offline
56
+ message: New content is available
57
+ title: Download
58
+ delete:
59
+ information: Delete downloaded content
60
+ warning:
61
+ text: Do you really want to delete all downloaded content?
62
+ title: Delete content
63
+ more:
64
+ information:
65
+ title: You are looking for further information?
66
+ description: Please order brochures or make an arrangement for a machine demonstration
67
+ order:
68
+ action:
69
+ send:
70
+ long: Send me the selected brochures for free
71
+ short: Send
72
+ delivery:
73
+ email: by E-mail
74
+ mail: by mail
75
+ error:
76
+ city: Please provide a city
77
+ country: Please select a country
78
+ deliveryemail: You have chosen E-mail delivery, but you have not accepted the
79
+ privacy agreement for this type of delivery
80
+ deliverymail: You have chosen mail delivery, but you have not accepted the privacy
81
+ agreement for this type of delivery.
82
+ email: Please fill in a correct e-mail address
83
+ firstname: Please fill in your first name
84
+ lastname: Please fill in your last name
85
+ nobrochure: You have to select at least one brochure
86
+ nodelivery: You have to select at least one type of delivery
87
+ postalcode: Please provide a postal code
88
+ privacy: You have to accept the privacy agreement
89
+ street: Please provide a street
90
+ form:
91
+ city: City
92
+ country: Country
93
+ email: E-mail
94
+ firstname: First name
95
+ lastname: Last name
96
+ postalcode: Postal Code
97
+ privacy: Privacy agreement
98
+ required: required
99
+ street: Street
100
+ section:
101
+ adress: Where you want us to send them?
102
+ brochures: Select the brochures you want
103
+ delivery: How do you want them delivered?
104
+ privacy: I have read and accepted the privacy agreement for delivery
105
+ success:
106
+ sent: Your brochure order has been sent
107
+ settings:
108
+ about: About
109
+ active_products:
110
+ title: Active Products
111
+ none: None
112
+ reset: Reset
113
+ content_settings: Content Settings
114
+ delete_content: Delete Content from Device
115
+ download_videos: Download Videos
116
+ event_mode_enabled: Event Mode Enabled
117
+ event_mode_settings: Event Mode Settings
118
+ imprint: Imprint
119
+ offline_news_requires_content_update: Enabling Offline News requires content update
120
+ offline_news: Offline News
121
+ preferred_languages: Preferred Languages
122
+ privacy: Privacy Agreement
123
+ requires_content_update: Changing this requires a content update
124
+ requires_downloading: Content has to be downloaded again
125
+ screensaver_active: Screensaver active
126
+ title: Settings
127
+ video:
128
+ offline:
129
+ message: Connect the device to the internet to view videos
130
+ title: Video not available offline
131
+ path:
132
+ to:
133
+ my_message: my new message
@@ -0,0 +1,11 @@
1
+ ---
2
+ storage_access:
3
+ title: No external Storage
4
+ warning: Can't download contents, as your device does not have an external storage
5
+ meidum (SD-Card or built-in storage).
6
+ b:
7
+ c:
8
+ d: blubb blubb2
9
+ second_warning: Another Warning
10
+ download_manager:
11
+ default_error: Download error occured. Please try again later.
@@ -0,0 +1,133 @@
1
+ ---
2
+ application:
3
+ navigation:
4
+ back: Back
5
+ appointment:
6
+ action:
7
+ send:
8
+ long: Make a request for a demonstration
9
+ short: Request
10
+ error:
11
+ email: Please fill in a correct e-mail address
12
+ firstname: Please fill in your first name
13
+ lastname: Please fill in your last name
14
+ phone: Please provide a phone number
15
+ privacy: You have to accept the privacy agreement
16
+ form:
17
+ desiredmonth: Month
18
+ desiredyear: Year
19
+ email: E-mail
20
+ firstname: First name
21
+ lastname: Last name
22
+ phone: Phone
23
+ privacy: privacy agreement
24
+ privacyagreement: I have read and accepted the privacy agreement
25
+ required: required
26
+ section:
27
+ adress: Contact information
28
+ desiredschedule: Preferred date
29
+ privacy: Privacy
30
+ success:
31
+ sent: Your request for a demonstration has been sent.
32
+ detail:
33
+ action:
34
+ cancel: Cancel
35
+ done: Done
36
+ download: Download Brochure
37
+ ok: Ok
38
+ share_product_generic: Share Product
39
+ share_product_fb: Share Product via Facebook
40
+ share_product_tw: Share Product via Twitter
41
+ download:
42
+ manager:
43
+ downloading: Downloading …
44
+ needspace: You need more free space to download the content.
45
+ preparing: Preparing …
46
+ home:
47
+ action:
48
+ appointment: Make an appointment for a demonstration
49
+ delete: Delete
50
+ order: Brochure order
51
+ share_app_generic: Share App
52
+ share_app_fb: Share App via Facebook
53
+ share_app_tw: Share App via Twitter
54
+ update:
55
+ error: You are offline
56
+ message: New content is available
57
+ title: Download
58
+ delete:
59
+ information: Delete downloaded content
60
+ warning:
61
+ text: Do you really want to delete all downloaded content?
62
+ title: Delete content
63
+ more:
64
+ information:
65
+ title: You are looking for further information?
66
+ description: Please order brochures or make an arrangement for a machine demonstration
67
+ order:
68
+ action:
69
+ send:
70
+ long: Send me the selected brochures for free
71
+ short: Send
72
+ delivery:
73
+ email: by E-mail
74
+ mail: by mail
75
+ error:
76
+ city: Please provide a city
77
+ country: Please select a country
78
+ deliveryemail: You have chosen E-mail delivery, but you have not accepted the
79
+ privacy agreement for this type of delivery
80
+ deliverymail: You have chosen mail delivery, but you have not accepted the privacy
81
+ agreement for this type of delivery.
82
+ email: Please fill in a correct e-mail address
83
+ firstname: Please fill in your first name
84
+ lastname: Please fill in your last name
85
+ nobrochure: You have to select at least one brochure
86
+ nodelivery: You have to select at least one type of delivery
87
+ postalcode: Please provide a postal code
88
+ privacy: You have to accept the privacy agreement
89
+ street: Please provide a street
90
+ form:
91
+ city: City
92
+ country: Country
93
+ email: E-mail
94
+ firstname: First name
95
+ lastname: Last name
96
+ postalcode: Postal Code
97
+ privacy: Privacy agreement
98
+ required: required
99
+ street: Street
100
+ section:
101
+ adress: Where you want us to send them?
102
+ brochures: Select the brochures you want
103
+ delivery: How do you want them delivered?
104
+ privacy: I have read and accepted the privacy agreement for delivery
105
+ success:
106
+ sent: Your brochure order has been sent
107
+ settings:
108
+ about: About
109
+ active_products:
110
+ title: Active Products
111
+ none: None
112
+ reset: Reset
113
+ content_settings: Content Settings
114
+ delete_content: Delete Content from Device
115
+ download_videos: Download Videos
116
+ event_mode_enabled: Event Mode Enabled
117
+ event_mode_settings: Event Mode Settings
118
+ imprint: Imprint
119
+ offline_news_requires_content_update: Enabling Offline News requires content update
120
+ offline_news: Offline News
121
+ preferred_languages: Preferred Languages
122
+ privacy: Privacy Agreement
123
+ requires_content_update: Changing this requires a content update
124
+ requires_downloading: Content has to be downloaded again
125
+ screensaver_active: Screensaver active
126
+ title: Settings
127
+ video:
128
+ offline:
129
+ message: Connect the device to the internet to view videos
130
+ title: Video not available offline
131
+ path:
132
+ to:
133
+ my_message: my new message