defuncart / flutter_pseudolocalizor

A Pseudolocalization tool for Flutter and Dart which generates pseudo, nonsensical translations for multiple languages from a given English source.
MIT License
7 stars 2 forks source link

Script may hang in 'repeatVowels' mode if there are no vowels #21

Open zzorba opened 1 year ago

zzorba commented 1 year ago

Just encountered this bug this morning, I introduced a very short string to my arb file:

"byLine": "by {name}",
"@byLine": {
  "placeholders": {
    "name": {
      "type": "String"
    }
   }
}

With text_expansion_format set to 'repeatVowels' , this resulted in the script failing to complete. Removing this line worked, as did changing the text_expansion_format to 'exclamationMarks'

Just an FYI for anyone else who encounters this strange bug someday.

defuncart commented 1 year ago

Thanks @zzorba for the report, probably the algorithm assumes that the text has a vowel 🙈 😅 I'll try to reproduce and fix it when I get a chance.