mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-22 11:03:13 +00:00
#79 start, and fix translation load when first run
This commit is contained in:
parent
268b530f75
commit
ce5f80e728
6 changed files with 114 additions and 116 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -21,4 +21,4 @@ yarn-error.log*
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
#Electron-builder output
|
#Electron-builder output
|
||||||
/dist_electron
|
/dist_electron*
|
|
@ -1,125 +1,123 @@
|
||||||
{
|
{
|
||||||
"Common": {
|
"Common":{
|
||||||
"AppName": "WebTools-NG",
|
"AppName":"WebTools-NG",
|
||||||
"SelServer": "Select Server",
|
"Home":{
|
||||||
"Ok": "OK",
|
"About":"@:Common.AppName is a tool that enables the use of tool modules to help with Plex Server management.",
|
||||||
"Home": {
|
"Modules":"Tool modules currently available are:",
|
||||||
"About": "@:Common.AppName is a tool that enables the use of tool modules to help with Plex Server management.",
|
"Name":"Home",
|
||||||
"Modules": "Tool modules currently available are:",
|
"Title":"Welcome to @:Common.AppName"
|
||||||
"Name": "Home",
|
|
||||||
"Title": "Welcome to @:Common.AppName"
|
|
||||||
},
|
},
|
||||||
"Language": {
|
"Language":{
|
||||||
"Description": "@:Common.Language.Name allows you to change language of the app",
|
"Description":"@:Common.Language.Name allows you to change language of the app",
|
||||||
"Name": "Language",
|
"Name":"Language",
|
||||||
"btnForce": "Force download"
|
"btnForce":"Force download"
|
||||||
},
|
},
|
||||||
"Login": {
|
"Login":{
|
||||||
"SignIn": "Sign in with plex.tv",
|
"SignIn":"Sign in with plex.tv",
|
||||||
"UseCred": "Use your regular Plex credentials",
|
"UseCred":"Use your regular Plex credentials",
|
||||||
"Note": "3.Party Auth is not supported!",
|
"Note":"3.Party Auth is not supported!",
|
||||||
"Username": "Username",
|
"Username":"Username",
|
||||||
"UsernamePrompt": "Enter your plex.tv Username",
|
"UsernamePrompt":"Enter your plex.tv Username",
|
||||||
"UsernameSave": "Remember Username",
|
"Password":"Password",
|
||||||
"Password": "Password",
|
"PasswordPrompt":"Enter your plex.tv password",
|
||||||
"PasswordPrompt": "Enter your plex.tv password"
|
"UsernameSave":"Remember Username"
|
||||||
},
|
},
|
||||||
"Menu": {
|
"SelServer":"Select Server",
|
||||||
|
"Menu":{
|
||||||
"File":{
|
"File":{
|
||||||
"menuFile": "File",
|
"menuFile":"File",
|
||||||
"menuOpenLogDir": "Open Log Directory",
|
"menuOpenLogDir":"Open Log Directory",
|
||||||
"menuQuit": "Quit"
|
"menuQuit":"Quit"
|
||||||
},
|
},
|
||||||
"Edit":{
|
"Edit":{
|
||||||
"menuEdit": "Edit",
|
"menuEdit":"Edit",
|
||||||
"menuUndo": "Undo",
|
"menuUndo":"Undo",
|
||||||
"menuRedo": "Redo",
|
"menuRedo":"Redo",
|
||||||
"menuCut": "Cut",
|
"menuCut":"Cut",
|
||||||
"menuCopy": "Copy",
|
"menuCopy":"Copy",
|
||||||
"menuPaste": "Paste",
|
"menuPaste":"Paste",
|
||||||
"menuDelete": "Delete",
|
"menuDelete":"Delete",
|
||||||
"menuSelectAll": "SelectAll"
|
"menuSelectAll":"SelectAll"
|
||||||
},
|
},
|
||||||
"View":{
|
"View":{
|
||||||
"menuView": "View",
|
"menuView":"View",
|
||||||
"menuReload": "Reload",
|
"menuReload":"Reload",
|
||||||
"menuForceReload": "Force Reload",
|
"menuForceReload":"Force Reload",
|
||||||
"menuToggleDeveloperTools": "Toggle Developer Tools",
|
"menuToggleDeveloperTools":"Toggle Developer Tools",
|
||||||
"menuActualSize": "Actual Size",
|
"menuActualSize":"Actual Size",
|
||||||
"menuZoomIn": "Zoom In",
|
"menuZoomIn":"Zoom In",
|
||||||
"menuZoomOut": "Zoom Out",
|
"menuZoomOut":"Zoom Out",
|
||||||
"menuToggleFullScreen": "Toggle Full Screen"
|
"menuToggleFullScreen":"Toggle Full Screen"
|
||||||
},
|
},
|
||||||
"Help":{
|
"Help":{
|
||||||
"menuHelp": "Help",
|
"menuHelp":"Help",
|
||||||
"menuForum": "Forums",
|
"menuForum":"Forums",
|
||||||
"menuGithub": "Github",
|
"menuGithub":"Github",
|
||||||
"menuManual": "Manual"
|
"menuManual":"Manual"
|
||||||
},
|
},
|
||||||
"Modules":{
|
"Modules":{
|
||||||
"ET":{
|
"ET":{
|
||||||
"Settings": "Settings"
|
"Settings":"Settings"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Modules": {
|
|
||||||
"ET": {
|
|
||||||
"Description": "@:Modules.ET.Name allows you to export some information about the medias in your libraries",
|
|
||||||
"Name": "ExportTool",
|
|
||||||
"ErrorServer": "No server",
|
|
||||||
"HSelectMedia": "Select Media Type",
|
|
||||||
"HSelectSelection": "Select Media Libary",
|
|
||||||
"SelectSelection": "Select Selection",
|
|
||||||
"HExportMedia": "Export Media",
|
|
||||||
"RadioMovies": "Movies",
|
|
||||||
"RadioTVSeries": "TV Series",
|
|
||||||
"RadioMusic": "Music",
|
|
||||||
"RadioPhotos" : "Photos",
|
|
||||||
"RadioOtherVideos": "Other Videos",
|
|
||||||
"ErrorNoServerSelected": "No server selected",
|
|
||||||
"LevelInfo": "Export level determines what data is going to be exported.",
|
|
||||||
"ExportLevel": "Export Level",
|
|
||||||
"SelectLevel": "Select level",
|
|
||||||
"BuildInLevels": "*** Buildin levels ***",
|
|
||||||
"CustomLevels": "*** Custom levels ***",
|
|
||||||
"NoLevelFound": "N/A",
|
|
||||||
"TT-ETType": "Here you select the type of library you want to export",
|
|
||||||
"TT-ETLibrary": "Here you select library you want to export",
|
|
||||||
"TT-ETLevel": "Here you select the values you want to export",
|
|
||||||
"Status":{
|
|
||||||
"StartExport": "Starting to Export",
|
|
||||||
"GetSectionItems": "Initial fetching items of {idx} in chuncks of {chunck}",
|
|
||||||
"Idle": "Idle",
|
|
||||||
"Status": "Status: ",
|
|
||||||
"Processing-Chunk": "Processing chunk {current} of {total}",
|
|
||||||
"Processing-Chunk-Detailed": "Processing chunk {current} of {total}.\nItems to export: {urlStr}"
|
|
||||||
},
|
|
||||||
"Settings":
|
|
||||||
{
|
|
||||||
"Settings": "Settings",
|
|
||||||
"Description": "Here you can define the settings for @:Modules.ET.Name",
|
|
||||||
"Browse": "Browse",
|
|
||||||
"SelectOutDir": "Select Output Directory",
|
|
||||||
"ArraySep": "Delimiter, with multiple info in same field",
|
|
||||||
"ColumnSep": "Delimiter between fields in CSV file",
|
|
||||||
"TimeOut": "Timeout when requesting info from PMS in sec (Global setting)",
|
|
||||||
"OrgTitleNull": "Default Original Title to title, if empty",
|
|
||||||
"SortTitleNull": "Default Sort title to title, if empty",
|
|
||||||
"AutoXLSCol": "Autosize column (xlsx only)",
|
|
||||||
"AutoXLSRow": "Autosize row (xlsx only)"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"About": {
|
"Ok":"OK"
|
||||||
"Description": "@:Modules.About.Name",
|
},
|
||||||
"Name": "About us and credits",
|
"Modules":{
|
||||||
"MainDevelopers": "Main Developers",
|
"ET":{
|
||||||
"Devdane22": "Tommy (aka dane22), a Plex community member (ukdtom on GitHub)",
|
"Description":"@:Modules.ET.Name allows you to export some information about the medias in your libraries",
|
||||||
"DevCPSO": "Casper (aka CPSO), a soon to be Plex community member (CPSO on GitHub)",
|
"Name":"ExportTool",
|
||||||
"TranslationBetaTestersTitle": "Translators and Beta Testers",
|
"HSelectMedia":"Select Media Type",
|
||||||
"TranslationBetaTestersText": "A huge thanks goes out to all the people who helped in translating and testing @:Common.AppName",
|
"HSelectSelection":"Select Media Libary",
|
||||||
"PlexPoCredits": "And many thanks to the authors/developers and staff at Plex. We are eternally grateful for your dedication, talent and hard work And our friends at POEditor.com, who provided a free translation site because we are an Open-Source project."
|
"SelectSelection":"Select Selection",
|
||||||
|
"HExportMedia":"Export Media",
|
||||||
|
"RadioMovies":"Movies",
|
||||||
|
"RadioTVSeries":"TV Series",
|
||||||
|
"RadioMusic":"Music",
|
||||||
|
"RadioPhotos":"Photos",
|
||||||
|
"RadioOtherVideos":"Other Videos",
|
||||||
|
"ErrorServer":"No server",
|
||||||
|
"ErrorNoServerSelected":"No server selected",
|
||||||
|
"Settings":{
|
||||||
|
"Settings":"Settings",
|
||||||
|
"Description":"Here you can define the settings for @:Modules.ET.Name",
|
||||||
|
"Browse":"Browse",
|
||||||
|
"SelectOutDir":"Select Output Directory",
|
||||||
|
"ArraySep":"Delimiter, with multiple info in same field",
|
||||||
|
"ColumnSep":"Delimiter between fields in CSV file",
|
||||||
|
"TimeOut":"Timeout when requesting info from PMS in sec (Global setting)",
|
||||||
|
"OrgTitleNull":"Default Original Title to title, if empty",
|
||||||
|
"SortTitleNull":"Default Sort title to title, if empty",
|
||||||
|
"AutoXLSCol":"Autosize column (xlsx only)",
|
||||||
|
"AutoXLSRow":"Autosize row (xlsx only)"
|
||||||
|
},
|
||||||
|
"LevelInfo":"Export level determines what data is going to be exported.",
|
||||||
|
"ExportLevel":"Export Level",
|
||||||
|
"SelectLevel":"Select level",
|
||||||
|
"BuildInLevels":"*** Buildin levels ***",
|
||||||
|
"CustomLevels":"*** Custom levels ***",
|
||||||
|
"NoLevelFound":"N/A",
|
||||||
|
"TT-ETType":"Here you select the type of library you want to export",
|
||||||
|
"TT-ETLibrary":"Here you select library you want to export",
|
||||||
|
"TT-ETLevel":"Here you select the values you want to export",
|
||||||
|
"Status":{
|
||||||
|
"Idle":"Idle",
|
||||||
|
"Status":"Status: ",
|
||||||
|
"Processing-Chunk":"Processing chunk {current} of {total}",
|
||||||
|
"Processing-Chunk-Detailed":"Processing chunk {current} of {total}.\nItems to export: {urlStr}",
|
||||||
|
"StartExport":"Starting to Export",
|
||||||
|
"GetSectionItems":"Initial fetching items of {idx} in chuncks of {chunck}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"About":{
|
||||||
|
"Description":"@:Modules.About.Name",
|
||||||
|
"Name":"About us and credits",
|
||||||
|
"MainDevelopers":"Main Developers",
|
||||||
|
"Devdane22":"Tommy (aka dane22), a Plex community member (ukdtom on GitHub)",
|
||||||
|
"DevCPSO":"Casper (aka CPSO), a soon to be Plex community member (CPSO on GitHub)",
|
||||||
|
"TranslationBetaTestersTitle":"Translators and Beta Testers",
|
||||||
|
"TranslationBetaTestersText":"A huge thanks goes out to all the people who helped in translating and testing @:Common.AppName",
|
||||||
|
"PlexPoCredits":"And many thanks to the authors/developers and staff at Plex. We are eternally grateful for your dedication, talent and hard work And our friends at POEditor.com, who provided a free translation site because we are an Open-Source project."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,10 @@
|
||||||
icon-pack="fas"
|
icon-pack="fas"
|
||||||
:disabled="btnDisable == true"
|
:disabled="btnDisable == true"
|
||||||
>{{ $t("Modules.ET.HExportMedia") }}</b-button>
|
>{{ $t("Modules.ET.HExportMedia") }}</b-button>
|
||||||
</div>
|
</div>
|
||||||
<div name="status">
|
<div name="status">
|
||||||
|
<b-form-input readonly
|
||||||
|
id="outDirbox" name="outDirbox" v-model="count" :disabled=true v-bind:placeholder="$t('Modules.ET.Status.Status')" />
|
||||||
{{ count }}
|
{{ count }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
import i18n from '../../../../i18n'
|
import i18n from '../../../../i18n'
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
this.getcbDefaults()
|
this.getcbDefaults(),
|
||||||
|
console.log('Ged strOrgTitleNull: ' + + i18n.t('Modules.ET.Settings.OrgTitleNull'))
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -44,12 +45,12 @@
|
||||||
ArraySep: wtconfig.get('ET.ArraySep'),
|
ArraySep: wtconfig.get('ET.ArraySep'),
|
||||||
ColumnSep: wtconfig.get('ET.ColumnSep'),
|
ColumnSep: wtconfig.get('ET.ColumnSep'),
|
||||||
TimeOut: wtconfig.get('PMS.TimeOut'),
|
TimeOut: wtconfig.get('PMS.TimeOut'),
|
||||||
cbSelected: [],
|
cbSelected: [],
|
||||||
cbOptions: [
|
cbOptions: [
|
||||||
{ text: i18n.t('Modules.ET.Settings.OrgTitleNull'), value: 'OrgTitleNull' },
|
{ text: i18n.t('Modules.ET.Settings.OrgTitleNull'), value: 'OrgTitleNull' },
|
||||||
{ text: i18n.t('Modules.ET.Settings.SortTitleNull'), value: 'SortTitleNull' },
|
{ text: i18n.t('Modules.ET.Settings.SortTitleNull'), value: 'SortTitleNull' },
|
||||||
{ text: i18n.t('Modules.ET.Settings.AutoXLSCol'), value: 'AutoXLSCol' },
|
{ text: i18n.t('Modules.ET.Settings.AutoXLSCol'), value: 'AutoXLSCol' },
|
||||||
{ text: i18n.t('Modules.ET.Settings.AutoXLSRow'), value: 'AutoXLSRow' }
|
{ text: i18n.t('Modules.ET.Settings.AutoXLSRow'), value: 'AutoXLSRow' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,8 @@ function loadLocaleMessages () {
|
||||||
var langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
var langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
||||||
log.debug(`Loading language: ${langCode}`)
|
log.debug(`Loading language: ${langCode}`)
|
||||||
messages[langCode] = JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
messages[langCode] = JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
||||||
if (wtconfig.get('General.language') != 'en'){
|
log.debug(`Defined language: ${wtconfig.get('General.language')}`)
|
||||||
|
if (wtconfig.get('General.language', 'en') != 'en'){
|
||||||
// We need to preload an additional language
|
// We need to preload an additional language
|
||||||
const langCode = wtconfig.get('General.language')
|
const langCode = wtconfig.get('General.language')
|
||||||
langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
||||||
|
|
|
@ -22,9 +22,6 @@ Vue.use(Buefy);
|
||||||
Vue.use(BootstrapVue);
|
Vue.use(BootstrapVue);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Logging start
|
// Logging start
|
||||||
// Remember to define log in all components where its used, as in below
|
// Remember to define log in all components where its used, as in below
|
||||||
const log = require('electron-log');
|
const log = require('electron-log');
|
||||||
|
@ -39,7 +36,6 @@ log.transports.file.fileName = wtutils.AppName;
|
||||||
log.transports.file.maxSize = wtconfig.get('Log.maxSize', 1048576);
|
log.transports.file.maxSize = wtconfig.get('Log.maxSize', 1048576);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log = log.log;
|
console.log = log.log;
|
||||||
log.info('*********************************')
|
log.info('*********************************')
|
||||||
log.info('Starting ' + wtutils.AppName + ' Version:' + wtutils.AppVersion);
|
log.info('Starting ' + wtutils.AppName + ' Version:' + wtutils.AppVersion);
|
||||||
|
|
Loading…
Reference in a new issue