boxblinkracer / phpunuhi

PHPUnuhi - The easy composable framework to validate and manage translations
MIT License
72 stars 5 forks source link

Allow to disable hierarchy #55

Open griesi007 opened 1 month ago

griesi007 commented 1 month ago

I just came across this promising project. I found one issue why it does not work in my case. I was just wondering if there is a solution I just did not found. My json files are plain key value pairs. The keys can contain sentences. When I run the command to fix the structure, all my translations are split up into multiple levels. So far as I can see this is due to the StorageHierarchy used in the storage and which seems to not be changeable. Is there any solution to keep my translation flat not split into multiple levels? I am not sure if this is intentional behaviour or a bug. Can this be disabled? So far as I understood I need to run fix structure so that empty translations are created for missing entries which then can be translated afterwards

Below is a sample Before fixing structure: "For the payroll accounting we need the completely filled out and signed personnel questionnaire from you. All fields marked with a red star or bordered in green are required for printing. After saving, please download the personnel questionnaire from the overview and then upload it, signed, to your profile.": "Per la contabilità salariale abbiamo bisogno del vostro questionario del personale debitamente compilato e firmato. Tutti i campi contrassegnati da una stella rossa o bordati di verde sono obbligatori per la stampa. Dopo il salvataggio, scarica il questionario del personale dalla panoramica e poi caricalo, firmato, sul tuo profilo.

After fixing structure

  "For the payroll accounting we need the completely filled out and signed personnel questionnaire from you": {
    " All fields marked with a red star or bordered in green are required for printing": {
      " After saving, please download the personnel questionnaire from the overview and then upload it, signed, to your profile": {
        "": "Per la contabilità salariale abbiamo bisogno del vostro questionario del personale debitamente compilato e firmato. Tutti i campi contrassegnati da una stella rossa o bordati di verde sono obbligatori per la stampa. Dopo il salvataggio, scarica il questionario del personale dalla panoramica e poi caricalo, firmato, sul tuo profilo."
      }
    }
  },
boxblinkracer commented 1 month ago

Hi there thank you for this Ill get back to you after vacation :)