TiddlyWiki / translations

Translations for TiddlyWiki 2.x
7 stars 17 forks source link

German translation for ExtensionsExplorerPlugin #11

Closed retostauss closed 11 months ago

retostauss commented 1 year ago

Not sure if I did it right ...

YakovL commented 1 year ago

Hi Reto, awesome,

what's not quite fine (nothing to worry about, just read the whole thing first) is that this time you've made a PR from your master branch, but it's preferrable to create a "feature" branch with a name that describes what's going on, like eep-de-translation. It's understandable: GitHub keeps the branch creation button deeper than it should (would be useful to have it here:

image

) and is generally not very educative about the process. Now let's see what this means for you:

Now, to the changes themselves:

YakovL commented 1 year ago

Ah, right, there's another issue: you've put the file to locales/core/extensions/..., while it should be locales/extensions/.... We can handle it later, but you can try it via github.dev using drag&drop in the file explorer (Ctrl + Shift + E) and then committing with a message like "fix: change translation location". Note: you have to "add" both "deletion" and "adding" the file when moving. Normally, git will then recognize the two changes as one "renaming" (moving = "renaming path"), but github.dev doesn't show that, you just "add" (stage) two changes:

https://github.com/TiddlyWiki/translations/assets/1131924/96d534a6-eff6-417c-b6a8-28d84e42df9b

Before the video above, I've moved the file .gitignore from java/ to java/src/ and in the video, I'm adding "deleting from java/andadding in java/src/`.

Also, I'll update the title to make it more specific ("feature: add German translation" → "feature: add German translation for ExtensionsExplorerPlugin" → "German translation for ExtensionsExplorerPlugin")

retostauss commented 1 year ago

Drag and drop worked in the file explorer. And thanks for the explanations. The test of the translation was successfull.

YakovL commented 12 months ago

Hi Reto, I've noticed that you haven't created a separate branch yet and added new commits into master. Let's fix this, so that you can go on with this quest and affect not others. For now, you can only one option to safely continue updating the core translation: do it inside the translate-264; if you now create a new branch from master, it will have unwanted changes:

This is what you will have if you now create translate-265 branch from master:

      * - *         translate-264
     /
* - * - * - * - *   master (with changes for EEP translation)
                 \
                  * - * translate-265 – will have unwanted changes

This is what you have currently:

      * - *         translate-264
     /
* - * - * - * - *   master (with changes for EEP translation)

This is what you need:

      * - *       translate-264
     /
* - *             master
     \
      * - * - *   translate-eep-de

so that you can then sync master:

      * - *       translate-264
     /     \
* - *   -   *     master
     \
      * - * - *   translate-eep-de

and then create translate-265 correctly:

      * - *       translate-264
     /     \
* - *   -   *     master
     \       \
      \       * - *  translate-265
       \
        * - * - *    translate-eep-de

The last picture illustrates that each new PR comes from a separate branch and merging one doesn't affect others in any way.

To help you with this, I've made a couple of "bad" commits (i.e. commits to master) in my https://github.com/YakovL/anki-manual fork:

and now I'll move them to a separate branch and share the steps:

  1. I open the repo (their default branch is called main, not master, but that doesn't make any difference)

  2. I create a new branch from master (naming it feature-branch; previously I wrote that the dropdown doesn't have a "new branch" button, but if you type a name that no existing branch has, there appears the "Create branch: ..." option below) image

  3. Now my feature-branch has those commits it should have, but master also has them, and I want to remove them. Ideally, it would be possible from github.dev as well, but I'm afraid it is not possible now. Here's how I do this: in a local command line, in some folder:

    • git clone https://github.com/YakovL/anki-manual to download the repo locally;
    • cd anki-manual to enter the folder and further use git for this repo;
    • git log --oneline -n 3 – I'd prefer to check history before the edit. I need to remove 2 commits, so I check the last 2+1;
    • git reset --hard HEAD~2 to remove the last 2 commits from the branch;
    • optionally, git log --oneline -n 3 again, but in fact reset reported that I'm on the right commit now;
    • git push origin main -f – force-push the branch to remove the commits in github (for you, it will be git push origin master -f).

    At this point I can see that the main branch is back to normal: image while feature-branch is 2 commits ahead: image

If you don't have git installed, you'll probably have to do some additional steps: setting name and email (probably not in this scenario as you don't commit anything) and doing some auth on attempt to push to Github.

If this is too much for you, I have another alternative, but it will require to close all the PRs first.

retostauss commented 11 months ago

Sorry for not carefully reading what you wrote ... I tried the correction to my best understanding (which is still incomplete 😥). It seems that I was able to create a new branch translate-264-2nd and revert the commits to the master.

Can you please check if it is as it should now? What about translate-264?

YakovL commented 11 months ago

Oh, wow, awesome! 👏 How did you do this? Via git or Github only? I can see that now your master branch is 1 commit behind https://github.com/TiddlyWiki/translations, so you can sync master (via the sync button at https://github.com/retostauss/translations), and your commits from this fork are put into another branch, which is what was needed, congratulations! 🎉

Only I'd rename that branch from translate-264-2nd into translate-eep-de so that it's clear from its name what it contains: image image image

Now you can create a new PR from that branch (to continue with translating EEP), and your flow will be fine! Also, after you do Sync to master, you can create translate-265 from it to further update the core translation.

retostauss commented 11 months ago

Did the revert using git CLI as you described. Rename is also done. Now I need holidays ;-).