slang-i18n / slang

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

Analyze command ignores enums #225

Closed ChaserVasya closed 6 days ago

ChaserVasya commented 2 weeks ago

To Reproduce Steps to reproduce the behavior: Fill only base locale file with this. (Example is ru locale)

  "employeePermissionTitleMap(context=EmployeePermission, param=perm)": {
    "canViewStatisticsWithRatingBlock": "Может просматривать статистику с рейтингом"
  }

run ... slang analyze _missing_translation.json output:

{
  "@@info": [
    "Here are translations that exist in <ru> but not in secondary locales.",
    "After editing this file, you can run 'dart run slang apply --locale=<locale>' to quickly apply the newly added translations."
  ],
  "az": {},
  "en": {},
  "es": {}
}

Expected behavior Something like this:

{
  "@@info": [
    "Here are translations that exist in <ru> but not in secondary locales.",
    "After editing this file, you can run 'dart run slang apply --locale=<locale>' to quickly apply the newly added translations."
  ],
  "az": {
    "employeePermissionTitleMap(context=EmployeePermission, param=perm)": {
      "canViewStatisticsWithRatingBlock": "Может просматривать статистику с рейтингом"
    }
  },
  "en": {
    "employeePermissionTitleMap(context=EmployeePermission, param=perm)": {
      "canViewStatisticsWithRatingBlock": "Может просматривать статистику с рейтингом"
    }
  },
  "es": {
    "employeePermissionTitleMap(context=EmployeePermission, param=perm)": {
      "canViewStatisticsWithRatingBlock": "Может просматривать статистику с рейтингом"
    }
  }
}

Additional context version: 3.31.0

Tienisto commented 1 week ago

Hello, somehow, I cannot reproduce this

ChaserVasya commented 6 days ago

Hmm. I cannot reproduce this again.