Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop

This commit is contained in:
Michael Teeuw 2016-07-27 12:51:18 +02:00
commit 10d05e1870
7 changed files with 85 additions and 5 deletions

View File

@ -4,9 +4,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## Unpublished
### Added
- Brazilian Portuguese Translation
### Fixed
- Prevent `getModules()` selectors from returning duplicate entries.
- Append endpoints of weather modules with `/` to retreive the correct data. (Issue [#337](https://github.com/MichMich/MagicMirror/issues/337))
- Corrected grammer in `module.js` from 'suspend' to 'suspended'.
### Added
- Added ability to turn off the date display in `clock.js` when in analog mode.
- Greek Translation
## [2.0.3] - 2016-07-12
### Added

View File

@ -114,7 +114,7 @@ var Module = Class.extend({
* This method is called when a module is hidden.
*/
suspend: function() {
Log.log(this.name + " is suspend.");
Log.log(this.name + " is suspended.");
},
/* resume()

View File

@ -101,5 +101,12 @@ The following properties can be configured:
<br><b>Default value:</b> <code>bottom</code>
</td>
</tr>
<tr>
<td><code>analogShowDate</code></td>
<td><strong>Specific to the analog clock.</strong> If the clock is used as a separate module and set to analog only, this configures whether a date is also displayed with the clock.<br>
<br><b>Possible values:</b> <code>false</code>, <code>top</code>, or <code>bottom</code>
<br><b>Default value:</b> <code>top</code>
</td>
</tr>
</tbody>
</table>

View File

@ -19,7 +19,8 @@ Module.register("clock",{
/* specific to the analog clock */
analogSize: '200px',
analogFace: 'simple', // options: 'none', 'simple', 'face-###' (where ### is 001 to 012 inclusive)
analogPlacement: 'bottom', // options: top, bottom, left, right
analogPlacement: 'bottom', // options: 'top', 'bottom', 'left', 'right'
analogShowDate: 'top', // options: false, 'top', or 'bottom'
secondsColor: '#888888',
},
// Define required scripts.
@ -170,8 +171,15 @@ Module.register("clock",{
// Display only an analog clock
dateWrapper.style.textAlign = "center";
dateWrapper.style.paddingBottom = "15px";
wrapper.appendChild(dateWrapper);
wrapper.appendChild(clockCircle);
if (this.config.analogShowDate === 'top') {
wrapper.appendChild(dateWrapper);
wrapper.appendChild(clockCircle);
} else if (this.config.analogShowDate === 'bottom') {
wrapper.appendChild(clockCircle);
wrapper.appendChild(dateWrapper);
} else {
wrapper.appendChild(clockCircle);
}
} else {
// Both clocks have been configured, check position
var placement = this.config.analogPlacement;

28
translations/gr.json Normal file
View File

@ -0,0 +1,28 @@
{
/* GENERAL */
"LOADING": "Φόρτωση &hellip;",
/* CALENDAR */
"TODAY": "Σήμερα",
"TOMORROW": "Αύριο",
"RUNNING": "Λήγει σε",
"EMPTY": "Δεν υπάρχουν προσεχείς εκδηλώσεις.",
/* WEATHER */
"N": "B",
"NNE": "BBA",
"NE": "BA",
"ENE": "ABA",
"E": "A",
"ESE": "ANA",
"SE": "NA",
"SSE": "NNA",
"S": "N",
"SSW": "NNΔ",
"SW": "NΔ",
"WSW": "ΔNΔ",
"W": "Δ",
"WNW": "ΔΒΔ",
"NW": "ΒΔ",
"NNW": "ΒΒΔ"
}

28
translations/pt_br.json Normal file
View File

@ -0,0 +1,28 @@
{
/* GENERAL */
"LOADING": "Carregando &hellip;",
/* CALENDAR */
"TODAY": "Hoje",
"TOMORROW": "Amanhã",
"RUNNING": "Acaba em",
"EMPTY": "Nenhum evento novo.",
/* WEATHER */
"N": "N",
"NNE": "NNE",
"NE": "NE",
"ENE": "ENE",
"E": "E",
"ESE": "ESE",
"SE": "SE",
"SSE": "SSE",
"S": "S",
"SSW": "SSO",
"SW": "SO",
"WSW": "OSO",
"W": "O",
"WNW": "ONO",
"NW": "NO",
"NNW": "NNO"
}

View File

@ -15,11 +15,12 @@ var translations = {
"nb" : "translations/nb.json", // Norsk bokmål
"nn" : "translations/nn.json", // Norsk nynorsk
"pt" : "translations/pt.json", // Português
"pt_br" : "translations/pt_br.json", // Português Brasileiro
"sv" : "translations/sv.json", // Svenska
"it" : "translations/it.json", // Italian
"zh_cn" : "translations/zh_cn.json", // Simplified Chinese
"zh_tw" : "translations/zh_tw.json", // Traditional Chinese
"ja" : "translations/ja.json", // Japanese
"pl" : "translations/pl.json", // Polish
"gr" : "translations/gr.json", // Greek
};