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

0.6 #391

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

0.6 #391

wants to merge 11 commits into from

Conversation

MimoGraphix
Copy link

  • When a new key found by user URL is logged while creating.
  • Possibility to ignore JSON translation entirely
  • Updated translation:find command
    • more specific regex
    • recognizing and logging variables from source code trans('something.something', ['variable' => $var1] )
    • location in the source is logged and displayed to a user
    • optional warning system when a key was not found in source code
  • Possibility to ignore all newly found keys by a user (for production)
  • index.php converted to blades
  • New editing view with focus only on one specific translation with additional details ( variables, URLs, source locations )

- improved translation finding regex, while finding logs place and possible parameters
- improved translation editing view, focus on one translation and move to another by arrows
- bit of code prettifying
- possibility to ignore JSON translations entirely
- log URL where key was found
- improved translation finding regex, while finding logs place and possible parameters
- improved translation editing view, focus on one translation and move to another by arrows
- bit of code prettifying
- possibility to ignore JSON translations entirely
- log URL where key was found
- fix missing method
- fix ignore_json conditions
- add indexes to ltm_translations_*
@Slubby
Copy link

Slubby commented Jun 8, 2021

Heyy man

great job you've done here. But i noticed if you use:

trans_choice('user.name.age', $years, ['name' => Sam])

Then it will not see the variables.

But great job.

@MimoGraphix
Copy link
Author

Heyy man

great job you've done here. But I noticed if you use:

trans_choice('user.name.age', $years, ['name' => Sam])

Then it will not see the variables.

But great job.

Hi @Slubby,
Thank you for your appreciation.

Sadly I was not able to put this into regex without splitting it into two different regexes and making it unnecessarily complicated.
But there is a feature (workaround) for these kinds of situations, variables in trans_choice() /trans() / ... are saved to the database also on the FE side.
Basically, every time user sees a "translation key" on the FE, method ->notifyMissingKeys() also writes variables into the database(even if "translation key" already exists in DB), this handles situations where variables were put dynamically with some method or they are declared as an array somewhere else in the code.

Hope this helps.

- debug mode for visible translation keys
- blades beautifying
@MimoGraphix
Copy link
Author

  • Search option has been added, now it is possible to search by translations by key or value within all groups.
  • Possibility to activate debug mode in configuration. After every translation will be placed original key in square brackets e.g.: trans('auth.login') -> Login [auth.login]
    NOTE: only when translation exists!

- debug mode for visible translation keys
- blades beautifying
- Visual differences in detail view between empty and filled locales.
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

2 participants