Closed Baspa closed 2 days ago
The changes involve modifications to the createOrUpdate
method in the SaveScan
class. The default parameter assignment for $mainKey
was adjusted for readability. Additionally, the logic for populating the $text
array was altered to only retrieve translations for the English locale, while other locales receive an empty string, changing the method's behavior regarding translation handling.
File | Change Summary |
---|---|
src/Services/SaveScan.php |
Modified createOrUpdate method: adjusted $mainKey default value assignment for readability; changed logic to assign translations only for the English locale, with other locales receiving an empty string. |
sequenceDiagram
participant User
participant SaveScan
participant Lang
User->>SaveScan: Call createOrUpdate(namespace, group, key, mainKey)
SaveScan->>Lang: Get translation for mainKey (if locale is 'en')
Lang-->>SaveScan: Return translation
SaveScan->>User: Return populated text array
🐰 In fields of code where changes bloom,
A rabbit hops, dispelling gloom.
With translations neat, and spaces wide,
Our method's flow takes a joyful ride!
So let us cheer, with a twitching nose,
For clearer paths where the logic flows! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
By default, the non-English translations strings were translated into English. Preferably I don't want that because I want to see which translation strings haven't been translated yet. I made a change which accomplish this.
Summary by CodeRabbit