Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language files #226

Closed
MoscaDotTo opened this issue Mar 23, 2018 · 2 comments
Closed

Language files #226

MoscaDotTo opened this issue Mar 23, 2018 · 2 comments
Labels
discussion enhancement for issues that involve feature requests winapp2ool For issues related to winapp2ool.exe or any of its constituent parts

Comments

@MoscaDotTo
Copy link
Owner

MoscaDotTo commented Mar 23, 2018

It has long been requested (and partially maintained for a small amount of time IIRC) that winapp2.ini support deleting language files.

Though this will never be the case with the master ini file (for obvious* reasons), I don't see any reason why this shouldn't be an option for people who would like it. A major limitation of language file cleaning has always been the infeasbility of properly maintaining an ini for each language and program.

This is where winapp2ool.exe comes into play! The underlying components of winapp2ool are object oriented, and this opens up the ability to create a "meta" ini file, and use that file to generate winapp2.ini entries.

So I have this idea that would allow us to curate an ini file, written in a hybrid winapp2ool/winapp2.ini syntax, that would automatically generate winapp2.ini files that contain entries for a specific language's cleaning.

A rough idea of what I'm thinking (I haven't put any of this to code yet because I just thought of it about half an hour ago and want to query the community before manifesting it) would be something like this:

[SomeApplication Language Files *] 
ENGLISHUS=en_us
SPANISH=es
JAPANESE=ja
...

Detect=...
Default=...
FileKey1=%ProgramFiles%\SomeApp|en_US;es;ja|*.*|RECURSE

Then using this format for the ini, an application would take in the name of a language and this meta ini and generate winapp2.ini entries for that language.

eg, the above ini entry and englishus as a language parameter would generate

[SomeApplication Language Files *]
Detect=...
Default=...
FileKey1=%ProgramFiles%\SomeApp|es|*.*|RECURSE
FileKey2=%ProgramFiles%\SomeApp|ja|*.*|RECURSE

or another way could be through use of ExcludeKeys, for which a similar syntax could be used. (Both could be implemented for maximum flexibility)

The basic (naive) implementation I envision is that a meta ini is maintained here on the GitHub (by someone who isn't me!) and winapp2ool uses that meta ini to generate custom lang.ini on a per-language basis (if an language isn't specified in a meta entry, it will simply be omitted from the generated set of entries). Those lang.ini files could then be merged with winapp2.ini

If there's someone(s) in the community who would be interested in maintaining such an ini, I don't think that making this module would be very difficult, and I could probably have it finished rather quickly. If not, I'll just close this bug for now. :)

*because this sort of entry is volatile and could break programs for people who don't closely examine what winapp2.ini is doing

@MoscaDotTo
Copy link
Owner Author

MoscaDotTo commented Mar 26, 2018

babel_TEST.zip

This is an extremely barebones demonstration of my ideas in the post above, it contains an ini with parameters for various languages and specially formatted filekeys that babel.exe then expands into normal winapp2.ini entries dynamically, based on user input.

Here is a sample of its output:

image

@ROCKNROLLKID
Copy link
Collaborator

ROCKNROLLKID commented Mar 26, 2018

It's not a bad idea, but I think it would be better to make another Winapp2 for advanced/more dangerous rules instead. I user long time ago posted an old winsys.ini file with a huge list of rejected/dangerous entries here. I could try digging that up and using that as a base. There has been other entries that have been suggested throughout winapp2, such as cleaning software distribution folder. Lots of installers these days usually let you select the languages you want or automatically detects the language you are and uses that, so I don't really see this tool being used a whole lot.

It is nice as it supports helps with all languages, rather then just English, but we don't really support other languages anyways and directories would be different for other languages, anyways.

@APMichael APMichael added winapp2 For issues related to winapp2.ini enhancement for issues that involve feature requests winapp2ool For issues related to winapp2ool.exe or any of its constituent parts discussion and removed winapp2 For issues related to winapp2.ini labels Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement for issues that involve feature requests winapp2ool For issues related to winapp2ool.exe or any of its constituent parts
Projects
None yet
Development

No branches or pull requests

3 participants