Problem/Motivation

Since #3027639: Make css/js optimized assets path configurable, released in versions 10.1 & 11.1, Drupal uses the assets:// wrapper to store and serve aggregated CSS and JS files.
This allows people with special storage needs to separate uploaded files from generated ones.

The locale module generates files for translations used in the JS scripts (cf _locale_rebuild_js()). These generated files are located in a configurable sub folder of the public:// base folder.

Proposed resolution

Use the assets:// base folder for consistency with other generated files.

CommentFileSizeAuthor
#3 3591076-3.patch3.22 KBduaelfr

Issue fork drupal-3591076

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

duaelfr created an issue. See original summary.

duaelfr’s picture

Status: Active » Needs review
Issue tags: -JavaScript +JavaScript
StatusFileSize
new3.22 KB

The fix is quite straight forward.
I don't think it's breaking BC but we might want to put this behind a feature flag just in case, aren't we?

Patch attached for composer.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: -JavaScript +JavaScript

Not sure a feature flag but maybe a CR?

duaelfr’s picture

Status: Needs work » Needs review

Not being a native English speaker makes me fear the exercise of writing a CR.
Feel free to make it better ;)

#3592731: JavaScript translation files are now stored in the assets:// path location

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Edited the numbers but seems good to me!

berdir’s picture

I think this and #3487600: Use the assets stream wrapper for translated javascript files are duplicates, fine to close the other one if this is RTBC, seems like the other issue had pretty much the same changes.

  • catch committed b81a5ed7 on 11.4.x
    feat: #3591076 JS translation files should be generated and served from...

  • catch committed f53b82e4 on 11.x
    feat: #3591076 JS translation files should be generated and served from...

  • catch committed b3b68aed on main
    feat: #3591076 JS translation files should be generated and served from...
catch’s picture

Version: main » 11.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and cherry-picked to 11.x and 11.4.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.