Open Yaguar666 opened 9 years ago
And what are it doing:
catch (Exception ex) ?
When it comes to localization the application used to have two separate settings.
It was at the time however; confusing for users because they would set the UI language and not set the Game Language. They would assume the program did not work.
I consolidated those two and the way it works now is when you click the Icon for the language at the top, it will set the game language to the same thing.
In this case the default work flow is that if you added a Russian flag to the top, and then click it. It would try and set the game language to Russian (which of course is not available at this time).
Each plugin also exposes a list of supported languages as well. As an example found here:
https://github.com/cjmanca/FFXIVDBM.Plugin/blob/master/FFXIVDBM.Plugin/Constants.cs#L46
It's used by code like this:
If the language isn't supported it will default to English.
With the new plugin changes I did I also don't use that localization library anymore and they are all now contained in named locale files inside the plugin.
The catch right now is just for catching errors but it can be logged use the NLog viewer.
Setup can be found here: http://ffxiv-app.com/topic/22/about-ffxivapp/3
Yeah. Hmm, and yet possible to make only the language of UI has changed, and the language of the game remained, say, English? Where can I edit the code?
Change, for example, Settings.Default.GameLanguage = "en" and UILanguage = "ru"?
It's not quite as simple as that; because for the UI to update it's tied to GameLanguage.
Let me see if there's something more I can do in the main app to allow this and make it work appropriately. Such as choosing a non-game language can request a UI update but default to a game language of English.
Hello again. It turned out to change something?
I found an annoying bug in the code in App.cs that prevented the localization of applications. I forgot to add "ru":
case "GameLanguage":
Constants.GameLanguage = Settings.Default.GameLanguage;
var lang = Settings.Default.GameLanguage.ToLower();
var cultureInfo = new CultureInfo("en");
switch (lang)
{
case "french":
cultureInfo = new CultureInfo("fr");
break;
case "japanese":
cultureInfo = new CultureInfo("ja");
break;
case "german":
cultureInfo = new CultureInfo("de");
break;
case "chinese":
cultureInfo = new CultureInfo("zh");
break;
case "russian":
cultureInfo = new CultureInfo("ru");
break;
}
Now the application is localized (the part that works with a dictionary). But the plugins is "Out of date" and not working. Although I rebuilt with new plugin dll. Maybe it depends on the version?
Ah, version check was added at 3.0.5592.26103 build, ok, will try to make it work)
Is it possible to make the plugin version that is higher than the version on the server, and also passed the validation work?
As long as the versions of the following libraries in the plugin are not lower than what is included in the app any plugin should load.
https://github.com/Icehunter/ffxivapp/blob/master/FFXIVAPP.Client/PluginHost.cs#L91
Regarding the UI and language updates. I'll be committing code tonight that changes the language buttons at the top to a drop down. Adding a new language is pretty simple and if you want a language different than the game language that will be allowed.
I'll have more details later after I commit.
Version of libraries are simple, but: Try to up version of Widgets.
If you recompiled any of those dependencies yourself they won't match the ones I released and prevent loading. if you go back to using the versions I have in the resource repo and from the released version of ffxivapp it should be fine.
I added a crutch to check the translation plugins) 2 hours - normal flight:
private bool HostAssemblyValidation(string name, Version version)
{
var reference = Assembly.GetExecutingAssembly()
.GetReferencedAssemblies()
.FirstOrDefault(a => a.Name == name);
if (reference == null)
{
return true;
}
return true;
// return version.CompareTo(reference.Version) == 0; }
You can change that locally if you like; but in the event something is upgrade like MahApps.Metro and the other plugins haven't updated it's going to cause the app to crash, behave badly or just show a white screen.
Yeap, it's only for test)
And what is responsible for setting the name of the plug-in, the name of the tab?
So far it doesn't support translation at this time however. I'm looking at a way to put that in.
Tx)))) Very quick answer))) It's hard to understand someone else's code) Slowly I understand)
Ok, it would be nice.
Updated the main app now to support separation of game/ui updates. So you can choose another language for the UI and have a different one for the game. Message boxes will advise on updates.
Cool! ^_^ And how to from the Dictionary, depending on the language, cause the variable? For example event_RegExLabel?
Where to download the changed files that you added to your repository? 95% is already translated. ^_^
Here's how you add your own language:
Which reminds me... I have to add Chinese into the parser as supported lol I thought I did that already.
I was add translation in files, added translation to the libraries. I wanted to help you, and add to the possibility of translate of the objects that you have not realized. How to add to XAML files - I understood by analogy it is easy to do. But what to do with calling a variable from the dictionary for C # ... For is simply one language, but for a few I have not thought of)
If you're dealing with the main application you only need to reference something like this:
https://github.com/Icehunter/ffxivapp/blob/master/FFXIVAPP.Client/Views/SettingsView.xaml#L29
AppProperties is imported globally for all xaml files.
However if it's a plugin make sure to add the following line at the top:
Then you import the PluginViewModel like so:
After that you can use it like this:
That's all I had to do:
https://drive.google.com/file/d/0BweYJ0oqWXvyamNIVXFBR1Jjc1E/view?usp=sharing
Somewhere there really is an error in translation, but it is fixable) And yet somehow plugins is "Out of Date".
Did you build own copies of any of these?
"FFXIVAPP.Common",
"FFXIVAPP.IPluginInterface",
"MahApps.Metro",
"HtmlAgilityPack",
"NAudio",
"Newtonsoft.Json",
"NLog",
"System.Windows.Interactivity"
If you did then you also have to compile the plugin with those versions. It's recommended that unless you have changes specific to something in those libraries you use the ones that came in the resources project or with the main app itself.
I changed only that main lib: "FFXIVAPP.Common", "FFXIVAPP.IPluginInterface" "FFXIVAPP.Localization" Yeap, i used changed versions for main app & plugins from the same source, but something don't work.
_<
Is your code pushed somewhere where I can see it; like github. I can pull the code and try to build it myself.
https://github.com/Yaguar666?tab=repositories Load all to github
Because you didn't fork them from github it was a little difficult to see some differences but one big difference is that the version of common.dll you use is much newer than that one I use, because of that no plugin will load until it's also compiled with that same version.
What changes did you make to common?
Reloaded. At first I loaded your files, and then changed over me now all changes at a glance)
https://github.com/Yaguar666?tab=repositories
I should not have got into the Common.dll? I just changed Localization.dll and recompile everything with which it is associated.
I recompile all over again, from Localization to plugins and plugins have earned)
Translation is almost ready, even the updated files to the 3.0. I added the possibility to localize most of the text. It remains only to translate the headings and lists of plugins. I need your help! ^ _ ^
How Do I in C # file Plugin.cs assign a variable from the dictionary? FriendlyName = Local.Dictonary ("event_FrendlyName")?
And that's where the change lists, for example: Ascending / Descending - in the plugin settings "Parse", I do not know (
The lists are stored in settings, rather than locale so I right now don't know how-to update that based on language as those things are saved to the users computer as well.
For the plugins you can access local I believe:
PluginViewModel.Instance.Locale["key"];
Hi Ryan! I need your help. I try to translate into Russian FFXIVAPP. Already translated and added similar components in the file:
Created and filled file Russian.cs
Translated and recompile: FFXIVAPP.Localization.dll FFXIVAPP.Common.dll FFXIVAPP.IPluginInterface.dll
I recompile FFXIVAPP, but can be seen only after the launch icon and explanation when it leads to the mouse cursor. Pressing the language is changed to English. All other languages work.
More plug-ins are no longer installed.
Just a test plug in unmodified FFXIVAPP, after installation and restart APP, remains in the "unidentified".
Is there any function to APP writing error, etc. a file? And it would be desirable to understand)