@@ -30,7 +30,7 @@ public partial class MainWindow : Form {
3030 private string jsonFilepath ;
3131 private string metaFilePath ;
3232 private string _defaultAuthor = "FFXIV Loose Texture Compiler" ;
33- private readonly string _defaultDescription = "Exported by FFXIV Loose Texture Compiler" ;
33+ private string _defaultDescription = "Exported by FFXIV Loose Texture Compiler" ;
3434 private string _defaultWebsite = "https://github.com/Sebane1/FFXIVLooseTextureCompiler" ;
3535 private string savePath ;
3636 private bool hasSaved ;
@@ -123,7 +123,7 @@ private async void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
123123 case DialogResult . Yes :
124124 if ( savePath == null ) {
125125 SaveFileDialog saveFileDialog = new SaveFileDialog ( ) ;
126- saveFileDialog . Filter = "FFXIV Sound Project|*.ffxivtp;" ;
126+ saveFileDialog . Filter = WFTranslator . String ( "FFXIV Texture Project" ) + " |*.ffxivtp;";
127127 if ( saveFileDialog . ShowDialog ( ) == DialogResult . OK ) {
128128 savePath = saveFileDialog . FileName ;
129129 }
@@ -181,7 +181,7 @@ public async void LaunchingXnormal() {
181181 Action safeWrite = delegate { LaunchingXnormal ( ) ; } ;
182182 generateButton . Invoke ( safeWrite ) ;
183183 } else {
184- exportLabel . Text = "Wait For xNormal" ;
184+ exportLabel . Text = await WFTranslator . String ( "Wait For xNormal" ) ;
185185 Console . WriteLine ( exportLabel . Text ) ;
186186 }
187187 }
@@ -190,7 +190,7 @@ public async void StartedProcessing() {
190190 Action safeWrite = delegate { StartedProcessing ( ) ; } ;
191191 generateButton . Invoke ( safeWrite ) ;
192192 } else {
193- exportLabel . Text = "Exporting" ;
193+ exportLabel . Text = await WFTranslator . String ( "Exporting" ) ;
194194 Console . WriteLine ( exportLabel . Text ) ;
195195 }
196196 }
@@ -240,15 +240,15 @@ private async void processGeneration_RunWorkerCompleted(object sender, System.Co
240240
241241 private async void SendModOverNetwork ( ) {
242242 exportPanel . Visible = true ;
243- exportLabel . Text = "Sending Over Network" ;
243+ exportLabel . Text = await WFTranslator . String ( "Sending Over Network" ) ;
244244 exportProgress . Visible = true ;
245245 Refresh ( ) ;
246246 Application . DoEvents ( ) ;
247247 networkedClient . SendModFolder ( connectionDisplay . SendId , modNameTextBox . Text , penumbraModPath ) ;
248248 exportProgress . Value = exportProgress . Maximum ;
249249 exportPanel . Visible = false ;
250250 exportProgress . Visible = false ;
251- exportLabel . Text = "Send Attempt Finished" ;
251+ exportLabel . Text = await WFTranslator . String ( "Send Attempt Finished" ) ;
252252 isNetworkSync = false ;
253253 if ( ! networkedClient . Connected ) {
254254 enableModshareToolStripMenuItem . Enabled = true ;
@@ -266,10 +266,14 @@ private async void processGeneration_DoWork(object sender, System.ComponentModel
266266 }
267267 private async void processGeneration_ProgressChanged ( object sender , System . ComponentModel . ProgressChangedEventArgs e ) {
268268 exportProgress . Value = Math . Clamp ( textureProcessor . ExportCompletion , 0 , exportProgress . Maximum ) ;
269- Console . WriteLine ( exportProgress . Value + "% Complete" ) ;
269+ Console . WriteLine ( exportProgress . Value + "%" + await WFTranslator . String ( " Complete") ) ;
270270 }
271271 private async void MainForm_Load ( object sender , EventArgs e ) {
272272 ReadLanguageOptions ( ) ;
273+ Translator . LoadCache ( Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "languageCache.json" ) ) ;
274+ TextureSet . GroupLocalization = await WFTranslator . String ( "Group" ) ;
275+ _defaultAuthor = await WFTranslator . String ( "FFXIV Loose Texture Compiler" ) ;
276+ _defaultDescription = await WFTranslator . String ( "Exported by FFXIV Loose Texture Compiler" ) ;
273277 RacePaths . VersionText = VersionText ;
274278 AutoScaleDimensions = new SizeF ( 96 , 96 ) ;
275279 Base . FilePath . Enabled = false ;
@@ -296,16 +300,16 @@ private async void MainForm_Load(object sender, EventArgs e) {
296300 mainFormSimplified . MainWindow = this ;
297301 GetDefaultMode ( ) ;
298302 CheckForCommandArguments ( ) ;
299- Translator . LoadCache ( Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "languageCache.json" ) ) ;
300- TextureSet . GroupLocalization = await WFTranslator . String ( "Group" ) ;
301303 VersionText = ( await WFTranslator . String ( Application . ProductName ) ) + " " + Program . Version ;
302304 WFTranslator . ParentForm = this ;
303305 WFTranslator . TranslateControl ( this ) ;
304306 WFTranslator . TranslateMenuStrip ( menuStrip1 ) ;
305307 WFTranslator . TranslateToolStripDropDown ( textureSetListContextMenu ) ;
308+ modAuthorTextBox . Text = _defaultAuthor ;
309+ modDescriptionTextBox . Text = _defaultDescription ;
306310 }
307311 public async void generateButton_Click ( object sender , EventArgs e ) {
308- exportLabel . Text = "Exporting" ;
312+ exportLabel . Text = await WFTranslator . String ( "Exporting" ) ;
309313 if ( ! lockDuplicateGeneration && ! generationCooldown . Enabled ) {
310314 if ( ! string . IsNullOrWhiteSpace ( modNameTextBox . Text ) ) {
311315 if ( string . IsNullOrEmpty ( penumbraModPath ) ) {
@@ -843,9 +847,9 @@ private async void addFaceButton_Click(object sender, EventArgs e) {
843847 hasDoneReload = false ;
844848 TextureSet textureSet = new TextureSet ( ) ;
845849 textureSet . TextureSetName = facePart . Text + ( facePart . SelectedIndex == 4 ? " "
846- + ( faceExtraList . SelectedIndex + 1 ) : "" ) + ", " + ( facePart . SelectedIndex != 4 ? genderList . Text : "Unisex" )
847- + ", " + ( facePart . SelectedIndex != 4 ? subRaceList . Text : "Multi Race" ) + ", "
848- + ( facePart . SelectedIndex != 4 ? faceTypeList . Text : "Multi Face" ) ;
850+ + ( faceExtraList . SelectedIndex + 1 ) : "" ) + ", " + ( facePart . SelectedIndex != 4 ? genderList . Text : await WFTranslator . String ( "Unisex" ) )
851+ + ", " + ( facePart . SelectedIndex != 4 ? subRaceList . Text : await WFTranslator . String ( "Multi Race" ) ) + ", "
852+ + ( facePart . SelectedIndex != 4 ? faceTypeList . Text : await WFTranslator . String ( "Multi Face" ) ) ;
849853 textureSet . BackupTexturePaths = null ;
850854 switch ( facePart . SelectedIndex ) {
851855 default :
@@ -1199,8 +1203,8 @@ private async void NewProject() {
11991203 savePath = null ;
12001204 textureList . Items . Clear ( ) ;
12011205 modNameTextBox . Text = "" ;
1202- modAuthorTextBox . Text = _defaultAuthor ;
12031206 modVersionTextBox . Text = "1.0.0" ;
1207+ modAuthorTextBox . Text = _defaultAuthor ;
12041208 modDescriptionTextBox . Text = _defaultDescription ;
12051209 modWebsiteTextBox . Text = _defaultWebsite ;
12061210 Base . CurrentPath = "" ;
@@ -2741,21 +2745,21 @@ public async void ExportEyePackList(IEnumerable<string> files, string modPackPac
27412745 }
27422746 }
27432747 }
2744- Task . Run ( ( ) => {
2748+ Task . Run ( async ( ) => {
27452749 foreach ( var item in keyValuePairs ) {
27462750 Thread . Sleep ( 500 ) ;
27472751 bool executed = false ;
2748- string modName1 = item . Key + " Eye Mod" ;
2749- string modName2 = item . Key + " Right Eye Mod" ;
2752+ string modName1 = item . Key + ( await WFTranslator . String ( " Eye Mod" ) ) ;
2753+ string modName2 = item . Key + ( await WFTranslator . String ( " Right Eye Mod" ) ) ;
27502754 string modPath1 = "" ;
27512755 string modPath2 = "" ;
2752- generateButton . Invoke ( ( ) => {
2756+ generateButton . Invoke ( async ( ) => {
27532757 try {
27542758 NewProject ( ) ;
2755- OpenLoadTemplate ( templatePath + "\\ " + "- Eye Pack Template.ffxivtp" , "Symmetrical Eyes And Left Eye" , item . Value ) ;
2756- OpenLoadTemplate ( templatePath + "\\ " + "- Eye Pack Template.ffxivtp" , "Right Eye" , item . Value ) ;
2759+ OpenLoadTemplate ( templatePath + "\\ " + "- Eye Pack Template.ffxivtp" , await WFTranslator . String ( "Symmetrical Eyes And Left Eye" ) , item . Value ) ;
2760+ OpenLoadTemplate ( templatePath + "\\ " + "- Eye Pack Template.ffxivtp" , await WFTranslator . String ( "Right Eye" ) , item . Value ) ;
27572761 foreach ( TextureSet textureSet in textureList . Items ) {
2758- if ( textureSet . GroupName == "Right Eye" ) {
2762+ if ( textureSet . GroupName == await WFTranslator . String ( "Right Eye" ) ) {
27592763 textureSet . InternalBasePath = textureSet . InternalBasePath . Replace ( "_" , "_b_" ) ;
27602764 textureSet . InternalNormalPath = textureSet . InternalNormalPath . Replace ( "_" , "_b_" ) ;
27612765 textureSet . InternalMaskPath = textureSet . InternalMaskPath . Replace ( "_" , "_b_" ) ;
@@ -2821,11 +2825,11 @@ public async void ExportContactPackList(IEnumerable<string> files, string modPac
28212825 }
28222826 }
28232827 }
2824- Task . Run ( ( ) => {
2828+ Task . Run ( async ( ) => {
28252829 foreach ( var item in keyValuePairs ) {
28262830 Thread . Sleep ( 500 ) ;
28272831 bool executed = false ;
2828- string modName1 = item . Key + " Contact Mod" ;
2832+ string modName1 = item . Key + ( await WFTranslator . String ( " Contact Mod" ) ) ;
28292833 string modPath1 = "" ;
28302834 generateButton . Invoke ( ( ) => {
28312835 try {
@@ -3181,5 +3185,9 @@ private async void exportProgress_Click(object sender, EventArgs e) {
31813185 private void resetLanguageSettingsToolStripMenuItem_Click ( object sender , EventArgs e ) {
31823186 ResetLanguageOptions ( ) ;
31833187 }
3188+
3189+ private void label2_Click ( object sender , EventArgs e ) {
3190+
3191+ }
31843192 }
31853193}
0 commit comments