slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
459 stars 39 forks source link

Full analyze command ignores inner translation usage #222

Closed ChaserVasya closed 3 months ago

ChaserVasya commented 3 months ago

Describe the bug analyze option have undesired behaviour.

To Reproduce

  "personBirthdayNotification(context=DatesRelation, param=relation)": {
    "inPast": "У клиента было день рождения @:days назад",
    "inFuture": "У клиента через @:days день рождения",
    "now": "У клиента сегодня день рождения"
  },
  "days": {
    "one": "$n день",
    "few": "$n дня",
    "many": "$n дней",
    "other": "$n дней"
  },

days is not used in source code, but used in personBirthdayNotification.

run analyze --full _unused_translation.json have next lines

    "days": {
      "one": "$n день",
      "few": "$n дня",
      "many": "$n дней",
      "other": "$n дней"
    }

Expected behavior After I run analyze --full, run clean, all is ok, no analyzer warning.

version 3.29.0

Tienisto commented 3 months ago

This should be fixed in 3.31.1