forked from antoineguilbert/android-messages-for-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
83 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Edit": "Edit", | ||
"Cut": "Cut", | ||
"Copy": "Copy", | ||
"Paste": "Paste", | ||
"Delete": "Delete", | ||
"Select all": "Select all", | ||
"Reload": "Reload", | ||
"Window": "Window", | ||
"Minimize": "Minimize", | ||
"Zoom": "Zoom", | ||
"About": "About", | ||
"Disconnect account": "Disconnect account", | ||
"Hide": "Hide", | ||
"Hide others": "Hide others", | ||
"Unhide": "Unhide", | ||
"Quit": "Quit" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Edit": "Édition", | ||
"Cut": "Couper", | ||
"Copy": "Copier", | ||
"Paste": "Coller", | ||
"Delete": "Supprimer", | ||
"Select all": "Tout sélectionner", | ||
"Reload": "Recharger", | ||
"Window": "Fenêtre", | ||
"Minimize": "Réduire", | ||
"Zoom": "Agrandir", | ||
"About": "À propos", | ||
"Disconnect account": "Déconnecter le compte", | ||
"Hide": "Masquer", | ||
"Hide others": "Masquer les autres", | ||
"Unhide": "Tout afficher", | ||
"Quit": "Quitter" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//Constants | ||
const path = require('path') | ||
const electron = require('electron') | ||
const fs = require('fs'); | ||
|
||
let loadedLanguage; | ||
let app = electron.app; | ||
|
||
module.exports = i18n; | ||
|
||
function i18n() { | ||
if(fs.existsSync(path.join(__dirname, app.getLocale() + '.js'))) { | ||
loadedLanguage = JSON.parse(fs.readFileSync(path.join(__dirname, app.getLocale() + '.js'), 'utf8')); | ||
}else{ | ||
loadedLanguage = JSON.parse(fs.readFileSync(path.join(__dirname, 'en.js'), 'utf8')); | ||
} | ||
} | ||
|
||
i18n.prototype.__ = function(phrase) { | ||
let translation = loadedLanguage[phrase] | ||
if(translation === undefined) { | ||
translation = phrase | ||
} | ||
return translation | ||
} |