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

useDefaultClean Option #1

Closed
wants to merge 4 commits into from
Closed

useDefaultClean Option #1

wants to merge 4 commits into from

Conversation

poke
Copy link
Member

@poke poke commented Dec 3, 2010

Hallo Nils,

hier ist der erste Pull-Request!

Ich hab eine neue Option useDefaultClean hinzugefügt, die es einzelnen Plugins erlaubt, den Standard-Cleaner zu deaktivieren. Beispielhaft dazu habe ich auch ein neues Plugin hinzugefügt, für Fotos auf Facebook. Dort ist es mir auch aufgefallen, dass der Standard-Cleaner nicht so optimal ist, weil die Facebook Dateinamen eh fürchterlich zufällig sind, es dort aber hilfreicher ist den gesamten Dateinamen zu erhalten, als manchmal die ersten Zeichen abzutrennen.

Damit die Option richtig funktioniert und auch abwärtskompatibel ist, habe ich zuvor noch die Überschreibung der einzelnen Settings dynamisch gemacht. So kann man einzelne Optionen in dem Plugin-Prototype vorbelegen, die nur bei Angabe im Plugin selbst überschrieben werden.

Gruß
Patrick

In english

(didn't know pull request messages were public)
Hi Nils,

here is the first pull request!

I have added an option useDefaultClean to allow specific plugins to disable the default cleaner. I added a plugin for photos on facebook as an example. Initially I noticed the problem with the default cleaner there, as the filenames are completely random. Having the default cleaner randomly cut off the first characters for some files is not helpful then.

To make that option work and backward compatible, I have also changed the way plugin settings are transferred in the factory. That way, we can preset particular plugin settings in the prototype and it will only get overwritten when the plugin sets that option itself.

Patrick

This allows default values to be set in the prototype which are taken
into account when the plugin does not set such values.
If enabled, the default cleaner is used on the filename, which removes
the first 3-5 characters if followed by an underscore or space symbol.
For backward compatibility, the default cleaner is enabled by default.

[#1558] Default cleaner considered harmful.
@nmaier
Copy link
Member

nmaier commented Dec 3, 2010

I cherry-picked all except for the localization fixes, adding a (IMO) better existence check on top of that.

As for the localization fixes: The de locale changes seem OK, the en-US one is not.
Please revert that and only apply the de stuff and create another pull request.

One topic per pull request, please ;)

@nmaier
Copy link
Member

nmaier commented Dec 3, 2010

PS: Feel free to add you as a contributor.
https://developer.mozilla.org/en/install_manifests#contributor

And feel free to add yourself as the "author": "poke" (or similar) to any new plugins you create.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants