laravel-translations-checker icon indicating copy to clipboard operation
laravel-translations-checker copied to clipboard

Fix command

Open LarsWiegers opened this issue 3 years ago • 2 comments

The idea:

Include an --fix option that fixes the problems we find. Scenario: lang/

  • nl/
  • actions.php
  • en/
  • actions.php

Lets say that both actions.php have this content: 'save' => 'save',

But the en version also has: 'saving' => 'saving',

But the nl version is missing it.

This would, of course, be caught by the check command, but what if it asks you to type the translation for the missing

translations if you use the --fix flag.

What do you want for the translation for nl (actions.php) 'saving' => 'saving' (en version) to be?

Where what you entered will be added to the nl version of the acitons.php file.

Or something like that. Would that be useful?

LarsWiegers avatar Mar 18 '22 16:03 LarsWiegers

Hello Lars,

for a "quick fix" and where the key value pair is expressive/short enough to know what's going on, yes!

For many fixes I would rather do it the old fashioned way. Maybe automatically add the missing keys at the end of the file in question / or create the missing file with the keys? That could be very helpful to jump start corrections too.

mikewink avatar Mar 24 '22 13:03 mikewink

Hi Mike,

Thx for the comment. I totally agree with you. I am currently very busy but I will take a crack at this somepoint in the future.

LarsWiegers avatar Mar 28 '22 07:03 LarsWiegers