mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-24 08:13:48 +01:00
work on code documentation and i18n ordering
This commit is contained in:
parent
0e281498a3
commit
7e367a7509
8
init.lua
8
init.lua
@ -1,11 +1,13 @@
|
||||
local modpath = minetest.get_modpath('mtimer')..DIR_DELIM
|
||||
local syspath = modpath..'system'..DIR_DELIM
|
||||
local fspath = syspath..'formspecs'..DIR_DELIM
|
||||
local get_dir_list = minetest.get_dir_list
|
||||
|
||||
|
||||
-- Set initial global `mtimer` table
|
||||
--
|
||||
-- @see ./system/formspec/formspec_creation.lua
|
||||
-- The sub tables are filesd programmatically.
|
||||
--
|
||||
-- @see ./system/formspecs/*
|
||||
-- @see ./system/load_configuration.lua
|
||||
mtimer = {
|
||||
translator = minetest.get_translator('mtimer'),
|
||||
@ -21,7 +23,7 @@ dofile(syspath..'load_configuration.lua')
|
||||
-- Load formspec-related files
|
||||
dofile(syspath..'formspec_helpers.lua')
|
||||
dofile(syspath..'on_receive_fields.lua')
|
||||
for _,f in pairs(get_dir_list(fspath, false)) do dofile(fspath..f) end
|
||||
for _,f in pairs(minetest.get_dir_list(fspath, false)) do dofile(fspath..f) end
|
||||
|
||||
|
||||
-- Load timer actions
|
||||
|
@ -1,17 +1,12 @@
|
||||
# textdomain: mtimer
|
||||
|
||||
|
||||
# mTimer Configuration Names
|
||||
Ingame Time Format=Spielzeit-Format
|
||||
Open Main Menu=Hauptmenü öffnen
|
||||
Real-World Time Format=Realzeit-Format
|
||||
Host Time Format=Hostzeit-Format
|
||||
Reset Everything=Alles zurücksetzen
|
||||
Session Duration Format=Sitzungsdauer-Format
|
||||
Session Start Time Format=Sitzungsstartzeit-Format
|
||||
Timer Format=Timerformat
|
||||
Custom Timer=Individueller Timer
|
||||
mTimer Configuration=mTimer-Konfiguration
|
||||
|
||||
|
||||
# Dialog: Visibility
|
||||
Visibility=Sichtbarkeit
|
||||
Make invisible=Verbergen
|
||||
@ -20,6 +15,7 @@ The timer is currently @1.=Der Timer ist aktuell @1.
|
||||
visible=sichtbar
|
||||
invisible=verborgen
|
||||
|
||||
|
||||
# Dialog: Position
|
||||
Position=Ausrichtung
|
||||
Click the position you want to place the timer at.=Auf die Stelle klicken, an der der Timer angezeigt werden soll.
|
||||
@ -31,12 +27,51 @@ left=links
|
||||
center=zentriert
|
||||
right=rechts
|
||||
|
||||
|
||||
# Dialog: Color
|
||||
Color=Farbe
|
||||
Current color: @1=Aktuelle Farbe: @1
|
||||
Use `@1` format only!=Ausschließlich `@1`-Format benutzen!
|
||||
Set a predefined color=Eine vordefinierte Farbe einstellen
|
||||
|
||||
|
||||
# Dialog: HUD Element Scale
|
||||
HUD Element Scale=Anzeigeskalierung
|
||||
The HUD element can be scaled between 1x (original size) and 10x (largest size due to performance reasons). Use the slider above to adjust the scaling to your needs.=Die Anzeige kann über den oben vorhandenen Schieberegler zwischen 1x (Originalgröße) und 10x (die aus Leistungsgründen die größte Größe) skaliert werden.
|
||||
Due to technical reasons the slider position does not reset when clicking the button to set to default values. The HUD element itself resets, and when re-entering this dialog the slider position is properly set.=Aus technischen Gründen wird die Position des Schiebereglers beim einstellen der Standardwerte nicht zurückgesetzt, die Anzeige selbst wird aber zurückgesetzt. Beim erneuten öffnen des Dialogs wird der Schieberegler automatisch angepasst.
|
||||
|
||||
|
||||
# Dialog: HUD Element Offset
|
||||
HUD Element Offset=Anzeigeversatz
|
||||
Vertical=Vertikal
|
||||
Horizontal=Horizontal
|
||||
Control the HUD element offset using the input on the right side and use the screenshot and markings as orientation for what is changed. The result is shown in the HUD in real time, so check for the actual timner position using the timer HUD element itself.=Anzeigeversatz des HUD-Elements über die Eingaben an der rechten Seite konfigurieren und dafür die Markierungen zur Orientierung verwenden. Das Ergebnis wir direkt übernommen. Die getätigen Änderungen können anhand des HUD-Elements sofort überprüft werden.
|
||||
|
||||
|
||||
# Dialog: Ingame Time
|
||||
Ingame Time Format=Spielzeit-Format
|
||||
|
||||
|
||||
# Dialog: Real-World Time Format
|
||||
Real-World Time Format=Realzeit-Format
|
||||
|
||||
|
||||
# Dialog: Session Start Time Format
|
||||
Session Start Time Format=Sitzungsstartzeit-Format
|
||||
|
||||
|
||||
# Dialog: Session Duration Format
|
||||
Session Duration Format=Sitzungsdauer-Format
|
||||
|
||||
|
||||
# Dialog: Host Time Format
|
||||
Host Time Format=Hostzeit-Format
|
||||
|
||||
|
||||
# Dialog: Timer Format
|
||||
Timer Format=Timerformat
|
||||
|
||||
|
||||
# Dialog: Timezone Offset
|
||||
Timezone Offset=Zeitzonenunterschied
|
||||
set a value between -12 and +12 hours=einen Wert zwischen -12 und +12 Stunden setzen
|
||||
@ -45,46 +80,9 @@ Current server time: @1=Aktuelle Serverseitige Zeit: @1
|
||||
Calculated local time: @1=Errechnete lokale Zeit: @1
|
||||
Please note that daylight saving time (DST) is ignored entirely due to minimizing implementation complexity. You need to manually adjust the time zone in order to adapt to any DST changes. This messes up the visual representation a bit (but it’s not very accurate anyways …).=Die Sommerzeit wird aus Gründen der Komplexität der Implementierung vollständig ignoriert. Um der Sommerzeit Rechnung zu tragen muss die Zeitzone angepasst werden. Dies bringt zwar die grafische Darstellung durcheinander, aber die ist eh nicht ganz genau.
|
||||
|
||||
# Dialog: HUD Element Offset
|
||||
HUD Element Offset=Anzeigeversatz
|
||||
Vertical=Vertikal
|
||||
Horizontal=Horizontal
|
||||
Control the HUD element offset using the input on the right side and use the screenshot and markings as orientation for what is changed. The result is shown in the HUD in real time, so check for the actual timner position using the timer HUD element itself.=Anzeigeversatz des HUD-Elements über die Eingaben an der rechten Seite konfigurieren und dafür die Markierungen zur Orientierung verwenden. Das Ergebnis wir direkt übernommen. Die getätigen Änderungen können anhand des HUD-Elements sofort überprüft werden.
|
||||
|
||||
# Dialog: HUD Element Scale
|
||||
HUD Element Scale=Anzeigeskalierung
|
||||
The HUD element can be scaled between 1x (original size) and 10x (largest size due to performance reasons). Use the slider above to adjust the scaling to your needs.=Die Anzeige kann über den oben vorhandenen Schieberegler zwischen 1x (Originalgröße) und 10x (die aus Leistungsgründen die größte Größe) skaliert werden.
|
||||
Due to technical reasons the slider position does not reset when clicking the button to set to default values. The HUD element itself resets, and when re-entering this dialog the slider position is properly set.=Aus technischen Gründen wird die Position des Schiebereglers beim einstellen der Standardwerte nicht zurückgesetzt, die Anzeige selbst wird aber zurückgesetzt. Beim erneuten öffnen des Dialogs wird der Schieberegler automatisch angepasst.
|
||||
|
||||
# Named Times
|
||||
ISO 8601 Date=Datum nach ISO 8601
|
||||
ISO 8601 Time=Zeit nach ISO 8601
|
||||
Ingame Timestamp=Spielzeitstempel
|
||||
Local Time: @1=Lokale Zeit: @1
|
||||
Server Time: @1=Serverzeit: @1
|
||||
Timestamp=Zeitstempel
|
||||
|
||||
# Named Time Parts
|
||||
Day Name=Tagesname
|
||||
Day=Tag
|
||||
Days=Tage
|
||||
Hours (12h)=12-Stunden-Stunde
|
||||
Hours (24h)=24-Stunden-Stunde
|
||||
Hours=Stunden
|
||||
Minutes=Minuten
|
||||
Month Name=Monatsname
|
||||
Month=Monat
|
||||
Seconds=Sekunden
|
||||
Year=Jahr
|
||||
|
||||
# Timer Format Variables
|
||||
In-Game Time=Spielzeit
|
||||
Real-World Date=Reale Zeit
|
||||
Session Duration=Sitzungsdauer
|
||||
Session Start Time=Sitzungsstart-Zeit
|
||||
Host Time=Hostzeit
|
||||
|
||||
# Custom Timer Setup
|
||||
# Dialog: Custom Timer
|
||||
Custom Timer=Individueller Timer
|
||||
Running=Timer läuft
|
||||
Stopped=Angehalten
|
||||
Finished=Abgeschlossen
|
||||
@ -100,6 +98,7 @@ Start the custom timer=Individuellen Timer starten
|
||||
Stop stop custom timer=Individuellen Timer anhalten
|
||||
Restart the custom timer=Individuellen Timer neu starten
|
||||
|
||||
|
||||
# Custonm timer status messages
|
||||
The custom timer is already running=Der individuelle Timer läuft bereits
|
||||
The custom timer is not running=Der individuelle Timer läuft nicht
|
||||
@ -107,6 +106,7 @@ The custom timer was started=Der individuelle Timer wurde gestartet
|
||||
The custom timer was stopped=Der individuelle Timer wurde angehalten
|
||||
The custom timer was restarted=Der individuelle timer wurde neu gestartet
|
||||
|
||||
|
||||
# Custom Timer Controls
|
||||
The timer is currently @1=Der Timer ist aktuell @1
|
||||
running=aktiv
|
||||
@ -115,6 +115,38 @@ Start=Starten
|
||||
Stop=Anhalten
|
||||
Restart=Neustart
|
||||
|
||||
|
||||
# Named Times
|
||||
ISO 8601 Date=Datum nach ISO 8601
|
||||
ISO 8601 Time=Zeit nach ISO 8601
|
||||
Ingame Timestamp=Spielzeitstempel
|
||||
Local Time: @1=Lokale Zeit: @1
|
||||
Server Time: @1=Serverzeit: @1
|
||||
Timestamp=Zeitstempel
|
||||
|
||||
|
||||
# Named Time Parts
|
||||
Day Name=Tagesname
|
||||
Day=Tag
|
||||
Days=Tage
|
||||
Hours (12h)=12-Stunden-Stunde
|
||||
Hours (24h)=24-Stunden-Stunde
|
||||
Hours=Stunden
|
||||
Minutes=Minuten
|
||||
Month Name=Monatsname
|
||||
Month=Monat
|
||||
Seconds=Sekunden
|
||||
Year=Jahr
|
||||
|
||||
|
||||
# Timer Format Variables
|
||||
In-Game Time=Spielzeit
|
||||
Real-World Date=Reale Zeit
|
||||
Session Duration=Sitzungsdauer
|
||||
Session Start Time=Sitzungsstart-Zeit
|
||||
Host Time=Hostzeit
|
||||
|
||||
|
||||
# Default Timer Format
|
||||
Current Date: @1=Aktuelles Datum: @1
|
||||
Ingame Time: @1=Spielzeit: @1
|
||||
@ -122,7 +154,8 @@ Session Duration: @1=Sitzungsdauer: @1
|
||||
Session Start: @1=Sitzungsstart: @1
|
||||
Custom Timer: @1=Individueller Timer: @1
|
||||
|
||||
# Generic Formspec Strings
|
||||
|
||||
# Dialog Buttons generic terms
|
||||
Apply=Anwenden
|
||||
Current Result=Aktuelles Ergebnis
|
||||
Current Value=Aktueller Wert
|
||||
@ -131,7 +164,8 @@ Exit=Verlassen
|
||||
Main Menu=Hauptmenü
|
||||
Variable=Variable
|
||||
|
||||
# Timer Weekdays
|
||||
|
||||
# Weekdays
|
||||
Monday=Montag
|
||||
Tuesday=Dienstag
|
||||
Wednesday=Mittwoch
|
||||
@ -140,7 +174,8 @@ Friday=Freitag
|
||||
Saturday=Samstag
|
||||
Sunday=Sonntag
|
||||
|
||||
# Timer Months
|
||||
|
||||
# Months
|
||||
January=Januar
|
||||
February=Februar
|
||||
March=März
|
||||
|
@ -4,6 +4,21 @@ local S = m.translator
|
||||
local esc = minetest.formspec_escape
|
||||
|
||||
|
||||
-- Draw a scale/ruler indicator
|
||||
--
|
||||
-- This function draws an either horizontal or vertical scale/ruler indicator
|
||||
-- of the given length and thickness in formspec units.
|
||||
--
|
||||
-- |--------|
|
||||
--
|
||||
-- It is also possible to set a color.
|
||||
--
|
||||
-- @param orientation Either `horizontal` or `vertical`
|
||||
-- @param length Desired Length as number in formspec units
|
||||
-- @param thickness Desired thicness as number in formspec units
|
||||
-- @param color Color as hexadecimal string without opacity (`#rrggbb`)
|
||||
--
|
||||
-- @return string The generated formspec code without container
|
||||
local draw_scale = function(orientation, length, thickness, color)
|
||||
local startX, startY, startWidth, startHeight
|
||||
local ruleX, ruleY, ruleWidth, ruleHeight
|
||||
|
@ -4,6 +4,21 @@ local S = m.translator
|
||||
local esc = minetest.formspec_escape
|
||||
|
||||
|
||||
-- Draw a scale ruler
|
||||
--
|
||||
-- This function creates a two-colored ruler that can be used as scale for
|
||||
-- scrollbars, etc. It is optionally possible to write first and last value
|
||||
-- below the scale ruler.
|
||||
--
|
||||
-- @param steps Steps the ruler should have
|
||||
-- @param length Overall length of the ruler in formspec units
|
||||
-- @param height Height of the ruler in formspec units
|
||||
-- @param pos A simple position table ({x=0,y=0}) for the container
|
||||
-- @param c_odd Odd segment color
|
||||
-- @param c_even Even segment color
|
||||
-- @param mark Either nil or a number in formspec units for the markings
|
||||
--
|
||||
-- @return string The formspec code for the scale ruler
|
||||
local draw_scale_ruler = function (steps,length,height,pos,c_odd,c_even,mark)
|
||||
local elements = ''
|
||||
local marks = ''
|
||||
@ -45,7 +60,7 @@ local draw_scale_ruler = function (steps,length,height,pos,c_odd,c_even,mark)
|
||||
end
|
||||
|
||||
return table.concat({
|
||||
'container['..pos[1]..','..pos[2]..']',
|
||||
'container['..pos.x..','..pos.y..']',
|
||||
elements,
|
||||
marks,
|
||||
'container_end[]'
|
||||
@ -74,7 +89,7 @@ mtimer.dialog.hud_element_scale = function (player_name)
|
||||
title = S('HUD Element Scale'),
|
||||
show_to = player_name,
|
||||
formspec = {
|
||||
draw_scale_ruler(10, 10, 0.25, {0,0}, '#729fcf', '#73f216', 0.45),
|
||||
draw_scale_ruler(10,10,0.25,{x=0,y=0},'#729fcf','#73f216',0.45),
|
||||
'scrollbaroptions['..sb_options..']',
|
||||
'scrollbar[0,0.25;10,0.25;horizontal;new_value;'..scale..']',
|
||||
'box[0,1.13;+contentWidth,0.01;#ffffff]',
|
||||
|
@ -1,6 +1,7 @@
|
||||
local m = mtimer
|
||||
local S = m.translator
|
||||
|
||||
|
||||
-- Get parsed timer data
|
||||
--
|
||||
-- Returns the parsed timer data (i.e. all variables are replaced with their
|
||||
|
Loading…
Reference in New Issue
Block a user