Example:
- Files from the German Wikipedia contain {{Bild-GFDL-Neu}}.
- This should become {{GFDL|migration=not-eligible}}.
- The instruction for this is ;Bild-GFDL-Neu:GFDL|+migration=not-eligible.
Acceptance Criteria
The + changes the meaning of what comes behind the =. It's not a source parameter name any more, but a static value. This means:
- CommonsHelperConfigParser already understands the + and turns it into a addIfMissing flag.
- Change CommonsHelperConfigParser so it does not use localParameters if a + was present, but remembers a value instead.
- Teach WikiTextContentCleaner to properly work with parameters that have a value:
- Make sure parameters marked with addIfMissing are added to the template, if missing. For an MVP it's ok to add such parameters either before or after all other, previously existing parameters.
- Make sure a parameter that already exists is not duplicated.
Possible follow up tickets:
- Make sure a new parameter is added at a position that closely matches the position in the configuration file. E.g. a configuration like a=…|+b=…|c=… and a source like |a=…|c=… should result in a=…|b=…|c=….
- T198582: Allow a configuration like a=source_parameter|+a=fallback value where a target parameter appears twice, one time with the name of a source parameter, and a second time with a static value. The static value should only be used if the source parameter was missing or empty.