mirror of
https://gitea.shironeko-all.duckdns.org/shironeko/Hytale-F2P-2.git
synced 2026-02-26 02:31:46 -03:00
Added internationalization support (i18n) (#74)
* - Implemented i18n. - Updated UI elements to use localized strings for various messages and confirmations. - Added language selection functionality in settings with appropriate event handling. - Created English localization file with translations for all new strings. - Updated backend to save and load user-selected language preferences. * Add Spanish localization for the GUI * Add Portuguese (Brazil) localization for the GUI * update main branch to release/v2.0.2b (#86) * add more linux pkgs, create auto-release and pre-release feature for Github Actions * removed package-lock from gitignore * update .gitignore for local build * add package-lock.json to maintain stability development * update version to 2.0.2b also add deps for rpm and arch * update 2.0.2b: add arm64 support, product and executable name, maintainers; remove snap; * update 2.0.2b: add latest.yml for win & linux, arm64 support; remove snap * fix release build naming * Prepare release v2.0.2b * Update localization for game repair and GPU settings Added new localization entries for game repair and GPU preferences. * Update spanish localization for game repair and GPU settings * Update portuguese (brazil) for game repair and GPU settings * Update localization for system logs in English, Spanish, and Portuguese --------- Co-authored-by: Fazri Gading <fazrigading@gmail.com>
This commit is contained in:
11
main.js
11
main.js
@@ -1,7 +1,7 @@
|
||||
const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const { launchGame, launchGameWithVersionCheck, installGame, saveUsername, loadUsername, saveChatUsername, loadChatUsername, saveChatColor, loadChatColor, saveJavaPath, loadJavaPath, saveInstallPath, loadInstallPath, saveDiscordRPC, loadDiscordRPC, isGameInstalled, uninstallGame, repairGame, getHytaleNews, handleFirstLaunchCheck, proposeGameUpdate, markAsLaunched } = require('./backend/launcher');
|
||||
const { launchGame, launchGameWithVersionCheck, installGame, saveUsername, loadUsername, saveChatUsername, loadChatUsername, saveChatColor, loadChatColor, saveJavaPath, loadJavaPath, saveInstallPath, loadInstallPath, saveDiscordRPC, loadDiscordRPC, saveLanguage, loadLanguage, isGameInstalled, uninstallGame, repairGame, getHytaleNews, handleFirstLaunchCheck, proposeGameUpdate, markAsLaunched } = require('./backend/launcher');
|
||||
const UpdateManager = require('./backend/updateManager');
|
||||
const logger = require('./backend/logger');
|
||||
const profileManager = require('./backend/managers/profileManager');
|
||||
@@ -405,6 +405,15 @@ ipcMain.handle('load-discord-rpc', () => {
|
||||
return loadDiscordRPC();
|
||||
});
|
||||
|
||||
ipcMain.handle('save-language', (event, language) => {
|
||||
saveLanguage(language);
|
||||
return { success: true };
|
||||
});
|
||||
|
||||
ipcMain.handle('load-language', () => {
|
||||
return loadLanguage();
|
||||
});
|
||||
|
||||
ipcMain.handle('select-install-path', async () => {
|
||||
const result = await dialog.showOpenDialog(mainWindow, {
|
||||
properties: ['openDirectory'],
|
||||
|
||||
Reference in New Issue
Block a user