added translations to definitions

This commit is contained in:
Steffen Vogel 2011-03-16 12:09:22 +01:00
parent d5406c3424
commit b783573d9e
3 changed files with 186 additions and 83 deletions

View file

@ -112,14 +112,6 @@ tbody tr td {
margin: 0;
}
#entity-list tr.channel span.indicator {
background-image: url("../images/chart_curve.png");
}
#entity-list tr.aggregator span.indicator {
background-image: url("../images/folder.png");
}
.indicator {
height: 12px;
}

View file

@ -29,129 +29,194 @@
{
"name" : "group",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"interpreter" : "Volkszaehler\\Interpreter\\AggregatorInterpreter",
"optional" : ["description", "details:", "owner:", "tolerance", "public"],
"icon" : "folder.png",
"interpreter" : "Volkszaehler\\Interpreter\\AggregatorInterpreter",
"model" : "Volkszaehler\\Model\\Aggregator",
"translation" : { "de" : "Gruppe" }
"translation" : {
"de" : "Gruppe",
"en" : "Group",
"fr" : "Groupe"
}
},
{
"name" : "user",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "tolerance", "active"],
"icon" : "", // TODO look for an icon
"interpreter" : "Volkszaehler\\Interpreter\\AggregatorInterpreter",
"optional" : ["description", "details:", "owner:", "tolerance", "public"],
"icon" : "user.png",
"interpreter" : "Volkszaehler\\Interpreter\\AggregatorInterpreter",
"model" : "Volkszaehler\\Model\\Aggregator",
"translation" : { "de" : "Nutzer" }
"translation" : {
"de" : "Nutzer",
"en" : "User",
"fr" : "Usager"
}
},
{
"name" : "building",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "tolerance", "public"],
"icon" : "house.png",
"interpreter" : "Volkszaehler\\Interpreter\\AggregatorInterpreter",
"model" : "Volkszaehler\\Model\\Aggregator",
"translation" : {
"de" : "Gebäude",
"en" : "Building",
"fr" : "Immeuble"
}
},
{
"name" : "power",
"required" : ["title", "resolution"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "port", "cuuid", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"],
"icon" : "bolt.png",
"unit" : "W",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Stromzähler" }
"translation" : {
"de" : "Stromzähler",
"en" : "Electric Meter",
"fr" : "Compteur de courant"
}
},
{
"name" : "powersensor",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "port", "cuuid", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"],
"icon" : "bolt.png",
"unit" : "W",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Stromsensor" }
"translation" : {
"de" : "Stromsensor",
"en" : "Electric Sensor",
"fr" : "Capteur de courant"
}
},
{
"name" : "gas",
"required" : ["title", "resolution"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "port", "cuuid", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"],
"icon" : "flame.png",
"unit" : "m³",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Gas" }
"translation" : {
"de" : "Gas",
"en" : "Gas",
"fr" : "Gaz"
}
},
{
"name" : "water",
"required" : ["title", "resolution"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "port", "cuuid", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"],
"icon" : "waterdrop.png",
"unit" : "m³",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Wasser" }
"translation" : {
"de" : "Wasser",
"en" : "Water",
"fr" : "Eau"
}
},
{
"name" : "temperature",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "thermometer.png",
"unit" : "°C",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Temperatur" }
"translation" : {
"de" : "Temperatur",
"en" : "Temperature",
"fr" : "Température"
}
},
{
"name" : "pressure",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "cloud.png",
"unit" : "hPa",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Luftdruck" }
"translation" : {
"de" : "Luftdruck",
"en" : "Barometric Pressure",
"fr" : "Pression d'air"
}
},
{
"name" : "humidity",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "rain.png",
"unit" : "%",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Luftfeuchtigkeit" }
"translation" : {
"de" : "Luftfeuchtigkeit",
"en" : "Air Humidity",
"fr" : "Hygrométrie"
}
},
{
"name" : "windspeed",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "propeller.png",
"unit" : "km/h",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Windgeschwindigkeit" }
"translation" : {
"de" : "Windgeschwindigkeit",
"en" : "Windspeed",
"fr" : "Vitesse du vent"
}
},
{
"name" : "radition",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"unit" : "", // TODO add unit
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "radioactivity.png",
"unit" : "μSv",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Strahlung" }
"translation" : {
"de" : "Radioaktivität (Dosis)",
"en" : "Radioactivity (Dose)",
"fr" : "Radioactivité (Dose)"
}
},
{
"name" : "luminosity",
"required" : ["title"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"unit" : "", // TODO add unit
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "sun.png",
"unit" : "cd",
"interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Lichtstärke" }
"translation" : {
"de" : "Lichtstärke",
"en" : "Luminosity",
"fr" : "Intensité lumineuse"
}
},
{
"name" : "workinghours",
"required" : ["title", "resolution"],
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "active"],
"icon" : "", // TODO look for an icon
"unit" : "h", // TODO add unit
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"],
"icon" : "clock.png",
"unit" : "h",
"interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter",
"model" : "Volkszaehler\\Model\\Channel",
"translation" : { "de" : "Betriebsstundenzähler" }
"translation" : {
"de" : "Betriebsstundenzähler",
"en" : "Working Hour Meter",
"fr" : "Compteur horaire"
}
}
]

View file

@ -30,75 +30,112 @@
"name" : "title",
"type" : "string",
"pattern" : "/[a-z0-9 ]/",
"min" : 3,
"min" : 4,
"max" : 255,
"translation" : { "de" : "Titel" }
"translation" : {
"de" : "Titel",
"en" : "Title"
}
},
{
"name" : "description",
"type" : "text",
"pattern" : "/[a-z0-9 ]/", // TODO add whitespaces as \t \n \r
"max" : 255, // TODO allowed column size in database?
"translation" : { "de" : "Beschreibung" }
"pattern" : "/[a-z0-9\\s]/",
"max" : 255, // TODO use "text" type for unlimited descriptions => PropertyModel
"translation" : {
"de" : "Beschreibung",
"en" : "Description"
}
},
{
"name" : "public",
"type" : "boolean",
"translation" : { "de" : "Öffentlich" }
"translation" : {
"de" : "Öffentlich",
"en" : "Public"
}
},
{
"name" : "active",
"type" : "boolean",
"translation" : { "de" : "Aktiv?" }
"translation" : {
"de" : "Aktiv",
"en" : "Active"
}
},
{
"name" : "cost",
"type" : "float",
"min" : 0,
"translation" : { "de" : "Kosten" }
"translation" : {
"de" : "Kosten",
"en" : "Costs"
}
},
{
"name" : "resolution",
"type" : "integer",
"min" : 1,
"translation" : { "de" : "Auflösung" }
"translation" : {
"de" : "Auflösung",
"en" : "Resolution"
}
},
{
"name" : "tolerance",
"type" : "float",
"min" : 0,
"max" : 1,
"translation" : { "de" : "Toleranz" }
"translation" : {
"de" : "Toleranz",
"en" : "Tolerance"
}
},
{
"name" : "address:lat",
"type" : "float",
"min" : -90,
"max" : 90,
"translation" : { "de" : "Latitude" }
"translation" : {
"de" : "Breitengrad",
"en" : "Latitude"
}
},
{
"name" : "address:lon",
"type" : "float",
"min" : -90,
"max" : 90,
"translation" : { "de" : "Longitude" }
"translation" : {
"de" : "Längengrad",
"en" : "Longitude"
}
},
{
"name" : "address:city",
"type" : "string",
"pattern" : "", // TODO add pattern
"translation" : { "de" : "Stadt" }
"pattern" : "/[a-z -]/",
"translation" : {
"de" : "Stadt",
"en" : "City"
}
},
{
"name" : "address:houseno",
"type" : "string",
"translation" : { "de" : "Hausnummer" }
"max" : 5,
"translation" : {
"de" : "Hausnummer",
"en" : "House Number"
}
},
{
"name" : "address:postal",
"type" : "string",
"translation" : { "de" : "Postleitzahl" }
"type" : "integer",
"translation" : {
"de" : "Postleitzahl",
"en" : "Postal Code"
}
},
{
"name" : "address:state",
@ -294,17 +331,26 @@
"Yemen",
"Zambia"
],
"translation" : { "de" : "Land" }
"translation" : {
"de" : "Land",
"en" : "State"
}
},
{
"name" : "address:country",
"type" : "string",
"translation" : { "de" : "Staat" }
"translation" : {
"de" : "Staat",
"en" : "Country"
}
},
{
"name" : "photo:url",
"type" : "string",
"pattern" : "", // TODO add pattern
"translation" : { "de" : "Foto (URL)" }
"translation" : {
"de" : "Foto (URL)",
"en" : "Photo (URL)"
}
}
]