Template files with translation have a special syntax, so don't just copy a "translated" html to a .in.html. Always take a .in.html as template if you want to add a new file. During the build, they're merged with the .po files into the .html files. You need to base your work on a .in.html file only. The .in.html has text bindings which will be translated.
If you have a look at  we have this:
<ko opts="if: state() == 0"> <_span data-translateable="true">OFF</_span> </ko>
So it will show "OFF" when the state is set accordingly. After .po merge by the built or manual triggering, this becomes:
<ko opts="ifnot: state "> <span data-translateable="true">OFF</span> <span xml:lang="de" data-translateable="true">AUS</span> <span xml:lang="fr" data-translateable="true">OFF</span> <span xml:lang="nl" data-translateable="true">UIT</span> </ko>
For each language you will get the "xml:lang" records with the translated content.
<input data-translateable="true" placeholder="Your text to translate"></input>
we have a POTFILES.in in the core/rpc/html/po directory, this lists all files that should be handled during translation. You are perhaps confused about the naming "templates/devices/switch.xml.in". You just need to rename your real template name "templates/devices/switch.in.html" to "templates/devices/switch.xml.in". This is by design and perhaps we will find some more nice way in future.
After you included your template for translation you need to trigger the translation scripts to get the .po and .pot file filled with the "requested" translation. You now can have a look into for e.g. de.po and you will find - mostly at the end - missing translations:
#: ../plugins/zwave/templates/zwaveConfig.xml.in.h:69 msgid "Reset controller" msgstr ""
Or even "automatic" translation which may be fuzzy:
#: ../plugins/zwave/templates/zwaveConfig.xml.in.h:70 #, fuzzy msgid "Download configuration" msgstr "Raum Konfiguration"
Your translation will start in the "msgstr" lines. Please mind the original text - not to loose some special chars or something like this. After you are finished with your local translation you need to run the merge translations script to see the result.
You can trigger this merge for tests on your dev server with this two commands: http://git.agocontrol.com/agocontrol/agocontrol/blob/master/core/rpc/html/updatetranslations.sh http://git.agocontrol.com/agocontrol/agocontrol/blob/master/core/rpc/html/mergetranslations.sh
cd core/rpc/html/ sh updatetranslations.sh sh mergetranslations.sh
Note: You will need the packages realpath and intltool installed for this
If you want to add a new language you can copy an existing .po file to your language code. If you have any questions or problems at this point contact us at IRC #agocontrol-devel on the freenode.net.
If you might want to point agorpc to your git checkout directory you can change the option in conf.d/rpc.conf: