loot / loot.github.io

The website and meta issue tracker.
https://loot.github.io
GNU General Public License v3.0
12 stars 9 forks source link

Update masterlists to utilise prelude concept #87

Closed pStyl3 closed 2 years ago

pStyl3 commented 3 years ago

Under https://github.com/loot/loot/issues/1492

In order for the masterlists to make use of the newly created prelude.yaml, a few things must be adjusted.

Part 1

The first step is to introduce changes on the existing v0.15 branch to start the migration process.

common: bash_tags: globals: groups: plugins:

- [x] Move everything in `masterlist.yaml`'s `common` section to the new `prelude/common` section, except for the `File Anchors` such as e.g.
```yaml
  - &SKSE
    name: '../skse_loader.exe'
    display: '[SKSE](https://skse.silverlock.org)'

as well as Sub-Anchors that reference Message Anchors such as e.g.

  - &useVersionDeadMoney
    <<: *useVersion
    subs: [ 'Dead Money' ]
    condition: 'active("DeadMoney.esm")'

Part 2

The following steps will need to performed, once the next LOOT version, that amongst other things has full support for prelude.yaml, has been released.

pStyl3 commented 3 years ago

The way I currently see it is, that we can't do every single of the above tasks all at once, at least not until a new LOOT version has been released that includes the updated libloot, or not?

We probably can start with adding the prelude/common node(s) to the masterlist, including the new short definitions of the Message Anchors.

But once we remove the Message Anchors from masterlist.yaml's common node (as they have been moved to prelude.yaml), and also try to replace the masterlist.yaml's globals's localised messages with Sub-Anchors (that reference newly defined Message Anchors in prelude.yaml's common section) - we try to do something, which the current LOOT v0.16.1 cannot handle.

Is my reasoning wrong here?

Ortham commented 3 years ago

The way I currently see it is, that we can't do every single of the above tasks all at once, at least not until a new LOOT version has been released that includes the updated libloot, or not?

I think you could do almost everything now, if you moved the localised messages in masterlist.yaml into the prelude: section (so like you have above, but not only the English content strings), because then everything is still self-contained in the masterlist but the localised messages will be replaced by what's in the prelude file when/if that is loaded. Once v0.17 is released, you can then remove the localised strings from the masterlist's prelude section.

That leads to duplicate localisations in the prelude file and the masterlist, but that's always going to be the case for masterlists earlier than v0.17 anyway.

pStyl3 commented 3 years ago

The Part 1 PR has been merged. If no issues get reported until tomorrow evening, I will do the same for the other masterlists, as well.

sibir-ine commented 3 years ago

When moving the global messages to the prelude node in the form of new anchors, you should leave behind aliases of those anchors so they're still displayed in the meantime. For instance, there should be a '*latestLOOTThread' in the globals node of each masterlist after migration.

pStyl3 commented 3 years ago

Right, you are correct. If I use my definitions from here, so e.g.

# Latest LOOT Thread
  - &lootThread
    <<: *latestLOOTThread
    subs: [ 'https://loot.github.io/latest-thread/' ]

in masterlist.yaml's globals node, the message will be correctly displayed. I will fix that in the masterlists I already updated in a bit.

I've also updated the opening post of this issue to reflect that, the last point for Part 1 was previously listed for Part 2.

Thanks

pStyl3 commented 3 years ago

Part 1 of the migration is finished for all masterlists.

pStyl3 commented 2 years ago

The v0.17 branches have been created for the different masterlists. The next step is "Part 2" from the first post, within v0.17 that is.

pStyl3 commented 2 years ago

The needed changes have been applied.

pStyl3 commented 2 years ago

Closing this issue as the needed changes have been done in the v0.17 branches.