The app Power By The Hour has become very popular over the last year. Maybe due to the energy (pricing) crisis. I would never had thought that this app, which was born out of my own frustration and originally created as quick and dirty as possible, would have thousands of users now.
Anyhow, I think it is time to have the app translated to all possible Homey languages.
Danish (da): Done by @Yestond
German (de): Done by @DirkG
English (en): Done
Spanish (es): Volunteer needed!
French (fr): Done by @sebyldino
Italian (it): Done by @Alessandro_Rossi
Dutch (nl): Done
Norwegian (no): Done by @Kai_Engvik
Polish (pl): In the works by @Jacek
Russian (ru): Volunteer needed!
Swedish (sv): Done by @Teddy
So if you want to immortalize your name as contributor to this app let me know as a reply to this topic.
Basically anyone that can translate and has basic PC skills can do the translation. You definitely do not need to be a programmer or tech wizzard! I created a how-to below. Just follow that and you will have learnt how to contribute to a an open source software development. You can use your newly acquired digital skill on your resume .
go to your own copy (fork): https://github.com/YOURNAME/com.gruijter.powerhour
4a) If it has been a while since you created the fork, or you are redoing translations, make sure you have the latest copy of the master. There should be 0 commits behind gruijter:master
right-click on the file README.txt and copy it in the same place. Rename it to README.xx.txt where xx is the 2-letter language abbreviation (e.g. no for Norwegian)
edit the content and replace it with the translated text. Note there is no need to click on a save button.
open the folder .homeycompose and edit the file app.json. IMPORTANT: MAKE SURE TO EDIT FROM THE .homeycompose FOLDER. The file app.json also exists in the root folder, but besides readme.xx.txt all language files MUST be edited from the .homecompose folder or from a xxx.compose.json file!
in app.json copy the full line with English description, including the comma on the end, and insert it before the “nl” line: "en": "Summarize the energy/water usage or (solar) production per hour, day, month and year. Use dynamic tariffs.",
Now replace “en” with the new language code, and replace the text with the translated version. IMPORTANT: YOU SHOULD NOT SEE RED CURLY LINES. If you do something is wrong (like a missing or misplaced comma)
open the .homeycompose\capabilities folder. Open each file and repeat step 9) for the title in each file.
open the .homeycompose\flows folder. Open each individual file and repeat step 9) for all places where there is an "en" text line.
open the drivers folder and find the file driver.compose.json in each of the drivers. There are 4 drivers, so step 9) has to be performed for all 4 files.
Check that you have translated all these files:
README.xx.txt in the root folder
app.json in folder .homeycompose
all files in folder .homeycompose\capabilities
all files in folder .homeycompose\flows
all files named driver.compose.json under the folder driver
you can add your own name in the "translators" section of .homeycompose\app.json. Copy the fullGB section before the NL section: { "name": "🇬🇧 Robin" },
off course replacing Robin with your own name, thereby making yourself immortal in PBTH
Check in the bottom left that the error count is at 0. If not: fix the problems
Now commit (save) the changes by clicking on the source-control icon. Enter a description, e.g. Norwegian translation and click on the commit-and-push checkmark.
Finally make sure that the changes you made in your own copy (fork) gets uploaded to the main code. Open the github page https://github.com/YOURNAME/com.gruijter.powerhour (back in browser) and click on Contribute - Open Pull Request
Then in the next screen click on Create pull request and follow the instructions.
Oops, just realized I forgot to mention some files that need a lot of translation. driver.compose.json. This file can be found under the /drivers folder. PBTH has 4 drivers, so there are 4 files to be translated.
@Gruijter : Have a question for you … do you want us to set the unit for the money capability translation in my case to Kr = Swedish kronor … I know you have the option in the settings for setting it individually … But do you want us to put in the default value for the country?
Nice work @Teddy and @DirkG . The Swedish and German translations are now merged in the main code. I will wait for the others a bit to finish too before releasing it in the app store.
Going to go over the translation one more time tomorrow for swedish. Just incase i had a brainfart going when i was translating it Cant hurt with a second go over. It should be ok but i am a litle paranoid that someone will some later on and tell me… Emm Ted how the … did you think there.