Skip to content

[3.x] Merge the frontend config for all translations within a rapidez namespace#836

Closed
BobWez98 wants to merge 4 commits intomasterfrom
feature/translations-merge
Closed

[3.x] Merge the frontend config for all translations within a rapidez namespace#836
BobWez98 wants to merge 4 commits intomasterfrom
feature/translations-merge

Conversation

@BobWez98
Copy link
Copy Markdown
Member

@BobWez98 BobWez98 commented May 2, 2025

This code will get every translation that is defined in a 'rapidez-*' namepsace within a frontend.php file. This will allow packages to add frontend translations with ease.

Docs; incoming


$allTranslations = collect($loader->namespaces())
->filter(function (string $path, string $namespace): bool {
return str($namespace)->startsWith('rapidez');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not too restrictive? This would only allow official Rapidez packages to add frontend translations, right? What if a different vendor wants to make a package for Rapidez that includes frontend translations?

@royduin
Copy link
Copy Markdown
Member

royduin commented May 21, 2025

Closing, reference: RAP-729

@royduin royduin closed this May 21, 2025
@royduin royduin deleted the feature/translations-merge branch May 21, 2025 13:36
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.

3 participants