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

Clean obselete, keep existing, add new with default + questions #45

Open
mtx-z opened this issue Nov 1, 2016 · 3 comments
Open

Clean obselete, keep existing, add new with default + questions #45

mtx-z opened this issue Nov 1, 2016 · 3 comments
Assignees
Labels

Comments

@mtx-z
Copy link

mtx-z commented Nov 1, 2016

Hey there,

thanks for the cool package. Seems really helpful, and i cant wait to get it working.
This is not an issue, but i would like some advices on the way to make what i need.

  • I already have translation file with some good (not obselte) value translated, some good value not translated (empty/null), some obselete value (strings no more in blade templates)
  • I updated my templates with new trans('the.string.code') string

What i need to do is so :

  • Delete obselete string from translation file (no more in template) (only obselete to keep non-obselete already translated strings)
  • Add new template string to file (from template update) with default value
  • Update empty/null string in file with default value

What i was thinking to do :

php artisan localization:missing -o -l "TODO: %LEMMA"
To find new translated string and set a default value + delete obselete ones (no more in templates)
Does it will also set null/empty translated string to the default value ?

As i see php artisan localization:missing -l 'Please translate this !'

set all lemma values to "Please translate this !"

And use the ":missing" parameter so maybe...

Thanks a lot :)

@mtx-z
Copy link
Author

mtx-z commented Nov 3, 2016

UPDATE :

  • my method worked :) it made exactly what i wanted.
  • but havent found a way to update string with empty/null values in string with value like "todo: %LEMA"

Ty !

@potsky potsky self-assigned this Nov 10, 2016
@potsky potsky added question and removed question labels Nov 10, 2016
@potsky
Copy link
Owner

potsky commented Nov 10, 2016

Hello,

You should delete manually all lemma with "TODO: ..." values. It cannot be automated by the package but an easy regex find with your favorite editor will do the job.

Then use the following command to set all lemma values to null to provide fallback translations to all missing values :

php artisan localization:missing -l null

@potsky potsky closed this as completed Nov 10, 2016
@potsky potsky removed the question label Nov 10, 2016
@potsky potsky reopened this Nov 10, 2016
@mtx-z
Copy link
Author

mtx-z commented Nov 10, 2016

Hello,
thanks for you answer.
Ok I got, it. I need to manually delete all lemmas that has been generated with the "TODO: ..." in lang files, then run command with null param to get empty values as default value for new added strings.

Perfect, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants