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

Merge upstream changes #2246

Merged
merged 101 commits into from Jun 11, 2023

Conversation

ClearlyClaire
Copy link

@ClearlyClaire ClearlyClaire commented Jun 10, 2023

⚠️ Upstream updated some dependencies, in particular react-intl, modernizing the code but at the cost of changing how locales are generated and loaded. Expect bugs.

This also drops statsd support because the code used for it is unmaintained, inefficient, and would prevent moving to Rails 7.

Merge upstream changes up to 44cd88a

This entirely rewrites how locales are generated and loaded. This is cleaner and simpler, but glitch-soc had some hacks to handle translations, so there may be some edge cases.

Some things are also known to be broken at this point because they were broken upstream, but this should be addressed later in this same PR.

Conflicts

  • .github/dependabot.yml:
    Updated upstream, but we've deleted it.
    Keep it deleted.
  • app/javascript/mastodon/locales/index.js:
    Reworked upstream, but the code was mostly in
    app/javascript/locales/index.js in glitch-soc.
    Updated that file accordingly.
  • app/javascript/packs/public.jsx:
    Not a real conflict, but different imports in glitch-soc and upstream.
  • app/views/layouts/application.html.haml:
    Conflict due to locales loading and theme system discrepancies.
    Updated in our own way.
  • app/views/layouts/embedded.html.haml:
    Conflict due to locales loading and theme system discrepancies.
    Updated in our own way.
  • config/webpack/generateLocalePacks.js:
    Deleted upstream, as upstream now directly loads the JSON at runtime.
    Deleted as well, will switch to runtime loading in an upcoming commit.
  • config/webpack/shared.js:
    Not a real conflict, but different imports in glitch-soc and upstream.
  • config/webpack/translationRunner.js:
    Mostly deleted upstream, to be replaced with formatjs-formatter.js instead.
    Moved the glitch-soc logic there and deleted the file.

Ported changes

Merge up to b922ad7

Conflicts

  • package.json:
    Upstream changed various script definitions in lines surrounding the one for i18n:extract, which had glitch-soc-specific changes.
    Updated the scripts as upstream did, while keeping our changes to i18n:extract.

Ported changes

Merge upstream changes up to e9385e9

Conflicts

None

Ported changes

Merge upstream changes up to 5fae2de

Conflicts

None

Ported changes

Postponed changes

Merge upstream changes up to b0780cf

This fixes some of the issues introduced in the first merge.

Conflicts

  • app/javascript/mastodon/load_locale.js:
    The file moved to app/javascript/mastodon/locales/load_locale.ts.
    Ported the changes there and deleted app/javascript/mastodon/load_locale.js.
  • app/javascript/mastodon/locales/index.js:
    The file moved to app/javascript/mastodon/locales/index.ts.
    Did not port the changes as I want to try something a bit different.

Ported changes

Merge upstream changes up to d8b0a73

Conflicts

  • config/initializers/simple_form.rb:
    Upstream added a new simple_form component, where we had an extra one.
    Kept both components.

Ported changes

Postponed changes

Merge upstream changes up to b85c387

Conflicts

  • config/initializers/content_security_policy.rb:
    Kept our version, it was not affected by upstream's bug.

Ported changes

Postponed changes

Skipped changes

  • 67d17ce I'm not sure it's useful, given “Illegal” is extremely location-dependent, servers are likely to have more precise rules

Merge upstream changes up to 16dd3f0

Conflict changes

  • app/views/settings/preferences/appearance/show.html.haml:
    Upstream fixed a translation bug in the theme selector that is absent from glitch-soc due to our different theming system.
    Discarded upstream changes.
  • streaming/index.js:
    Upstream changed the signature of a function to change its return type.
    This is not a real conflict, the conflict being caused by an extra argument in glitch-soc's code.
    Applied upstream's change while keeping our extra argument.

Ported changes

None

Merge up to 42a0898

No conflicts or nothing to port

Additional changes

  • 34efd1a stop using the locales common chunk that used to contain, well, locales handling code, instead have webpack generate a common chunk like upstream
  • 20718a8

renchap and others added 30 commits May 31, 2023 23:43
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ClearlyClaire and others added 6 commits June 10, 2023 15:09
Port e9385e9 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Port b3f9a0d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
…oc/merge-upstream

Conflicts:
- `app/javascript/mastodon/load_locale.js`:
  The file moved to `app/javascript/mastodon/locales/load_locale.ts`.
  Ported the changes there and deleted `app/javascript/mastodon/load_locale.js`.
- `app/javascript/mastodon/locales/index.js`:
  The file moved to `app/javascript/mastodon/locales/index.ts`.
  Did *not* port the changes as I want to try something a bit different.
Port b0780cf to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
ClearlyClaire and others added 17 commits June 10, 2023 16:22
…oc/merge-upstream

Conflicts:
- `config/initializers/simple_form.rb`:
  Upstream added a new simple_form component, where we had an extra one.
  Kept both components.
Port acc419b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
…on sign-up

Port SCSS from 0766c9a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Port bacb674 to glitch-soc

Co-authored-by: Liam Cooke <liam@liamcooke.com>
Co-authored-by: John Holdun <john@johnholdun.com>
Co-authored-by: Effy Elden <effy@effy.space>
Co-authored-by: Lina Reyne <git@lina.pizza>
Co-authored-by: Lina <20880695+necropolina@users.noreply.github.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Port c2c3961 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Port a6c898f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
…nippets for /

Port 1483a3d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
…oc/merge-upstream

Conflicts:
- `config/initializers/content_security_policy.rb`:
  Kept our version, it was not affected by upstream's bug.
Port fb5bf5c to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Port e4fd950 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
…oc/merge-upstream

Conflicts:
- `app/views/settings/preferences/appearance/show.html.haml`:
  Upstream fixed a translation bug in the theme selector that is absent from
  glitch-soc due to our different theming system.
  Discarded upstream changes.
- `streaming/index.js`:
  Upstream changed the signature of a function to change its return type.
  This is not a real conflict, the conflict being caused by an extra
  argument in glitch-soc's code.
  Applied upstream's change while keeping our extra argument.
…oc/merge-upstream

Conflicts:
- `app/views/settings/preferences/appearance/show.html.haml`:
  Conflict because glitch-soc does not have a theme selector here.
@ClearlyClaire ClearlyClaire marked this pull request as ready for review June 10, 2023 17:39
@ClearlyClaire
Copy link
Author

The i18n failures is because the code now checks that there are no inconsistent definitions of source strings, and some have been redefined in changes that have not yet been ported (onboarding, DM, …)

@ClearlyClaire ClearlyClaire merged commit af97a6a into glitch-soc:main Jun 11, 2023
29 of 31 checks passed
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