forked from ikubicki/fibaro-sma-power-sensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
i18n.lua
41 lines (38 loc) · 1023 Bytes
/
i18n.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--[[
Internationalization tool
@author ikubicki
]]
class 'i18n'
function i18n:new(langCode)
self.phrases = phrases[langCode]
return self
end
function i18n:get(key)
if self.phrases[key] then
return self.phrases[key]
end
return key
end
phrases = {
pl = {
['name'] = 'SMA czujnik mocy PV',
['refresh'] = 'Odśwież',
['last-update'] = 'Ostatnia aktualizacja: %s',
['please-wait'] = 'Proszę czekać...',
['device-updated'] = 'Zaktualizowano dane czujnika',
},
en = {
['name'] = 'SMA PV Power sensor',
['refresh'] = 'Refresh',
['last-update'] = 'Last update at %s',
['please-wait'] = 'Please wait...',
['device-updated'] = 'Sensor data updated',
},
de = {
['name'] = 'SMA PV-Leistung sensor',
['refresh'] = 'Aktualisieren',
['last-update'] = 'Letztes update: %s',
['please-wait'] = 'Ein moment bitte...',
['device-updated'] = 'Sensor aktualisiert',
}
}