Skip to content

Conversation

@rahul-vyas-dev
Copy link

@rahul-vyas-dev rahul-vyas-dev commented Nov 15, 2025

Description

This pull request adds support for the Rajasthani language to the project.
The update includes new translation files, proper localization setup, and integration with the existing i18n workflow.

This change ensures users can switch to the Rajasthani language and experience the UI fully translated.

Fixes #604

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested the Rajasthani translation file locally by running the project.

  • Verified that all keys display correctly and no missing translation warnings appear.

  • Manually checked each updated screen to confirm the translated strings are rendered as expected.

  • Tested switching languages from the settings menu to ensure Rajasthani is selectable.

Test Steps:

  • Pull the latest codebase.

  • Switch the app language to Rajasthani.

  • Navigate through pages to confirm translations load correctly.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

Summary by CodeRabbit

  • New Features

    • Rajasthani (raj) language added across the app with full translations, pluralization, and dynamic messages.
    • Locale selection and runtime localization updated so UI, notifications, prompts and accessibility labels support raj.
  • Chores

    • Added Raj locale resources and date/time formatting data to ensure correct display and locale-aware formatting.

@github-actions
Copy link
Contributor

🎉 Welcome @rahul-vyas-dev!
Thank you for your pull request! Our team will review it soon. 🔍

  • Please ensure your PR follows the contribution guidelines. ✅
  • All automated tests should pass before merging. 🔄
  • If this PR fixes an issue, link it in the description. 🔗

We appreciate your contribution! 🚀

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

Walkthrough

Adds Rajasthani ("raj") locale: updates iOS bundle and l10n config, registers Raj localization delegates in the app, introduces Raj Intl/provider code and Material localizations, adds ARB resource and generated AppLocalizationsRaj with translations and plural/select implementations.

Changes

Cohort / File(s) Summary
iOS & l10n config
ios/Runner/Info.plist, l10n.yaml
Inserted raj into CFBundleLocalizations and added raj to l10n supported-locales.
App localization wiring
lib/main.dart, lib/l10n/app_localizations.dart
Imported Raj intl; added AppLocalizationsRaj.delegate to localizationsDelegates; added Locale('raj') to supportedLocales; extended _AppLocalizationsDelegate.isSupported and lookupAppLocalizations to include raj.
Raj Material/localization provider
lib/l10n/raj_intl.dart
Added Raj Material localization delegate (_AppLocalizationsRajs), AppLocalizationsRaj (Material localizations), and public constants rajLocaleDatePatterns/rajDateSymbols; initializes date/number formats on load.
Raj AppLocalizations implementation
lib/l10n/app_localizations_raj.dart
Added generated AppLocalizationsRaj class with extensive translated getters, parameterized messages, and plural/select logic.
Raj resource bundle
lib/l10n/app_raj.arb
Added app_raj.arb containing Raj translations, placeholders, metadata, and plural/select definitions.
Integration
lib/main.dart, lib/l10n/raj_intl.dart
Registered Raj delegates in the app and wired initialization of locale-specific formats.
Auxiliary
untranslated.txt
Appended a raj block mirroring existing translation keys for tracking untranslated entries.

Sequence Diagram(s)

sequenceDiagram
    participant Platform as Platform Locale
    participant App as GetMaterialApp
    participant L10n as AppLocalizations
    participant MaterialL as MaterialLocalizations

    Note over Platform,App: App start / incoming locale
    Platform->>App: Locale(languageCode: "raj")
    App->>App: localeResolutionCallback(locale)
    alt languageCode == 'raj'
        App-->>App: select Locale('raj')
    else match supportedLocales
        App-->>App: select first supported match
    else
        App-->>App: fallback Locale('en')
    end
    App->>L10n: lookupAppLocalizations(Locale('raj'))
    L10n-->>App: AppLocalizationsRaj instance
    App->>MaterialL: load Raj Material delegate
    MaterialL-->>App: AppLocalizationsRaj (Material variants)
    Note over L10n,MaterialL: Intl/date-number formats initialized for 'raj'
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • lib/l10n/raj_intl.dart — date/number pattern correctness, delegate load/initialization, MaterialLocalizations integration.
    • lib/l10n/app_localizations_raj.dart and lib/l10n/app_raj.arb — plural/select logic, placeholder metadata, interpolation and Intl usage.
    • lib/l10n/app_localizations.dart and lib/main.dart — supportedLocales/lookup and delegate registration edge cases.

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • M4dhav

Poem

🐰 I hopped through strings and date-format streams,
Planted "raj" where app localization gleams.
From plist to ARB each key found its nest,
Delegates awake — the translations have dressed.
Now Rajasthani voices join the rest. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add support for 'raj' locale in the application' clearly and concisely summarizes the main change: adding Rajasthani language locale support to the application.
Linked Issues check ✅ Passed The PR successfully implements Rajasthani language support as required by issue #604, adding translation files, localization setup, and integrating the new locale into the i18n workflow.
Out of Scope Changes check ✅ Passed All changes are directly related to adding Rajasthani locale support: translation files, localization configuration, delegate setup, and integration. No unrelated out-of-scope modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rahul-vyas-dev
Copy link
Author

@M4dhav please review

@M4dhav
Copy link
Contributor

M4dhav commented Nov 15, 2025

Looks like Rajasthani has a ISO 639-2. Language Spec code. As far as I know, flutter_localizations only supports ISO 639-1 Language codes. Can you confirm that ISO 639-2 are supported?

Copy link
Contributor

@M4dhav M4dhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a video to verify that this works in-app

@rahul-vyas-dev
Copy link
Author

Hey @M4dhav ! Actually my Flutter setup got corrupted recently, and I’m facing issues getting the environment working again (I also mentioned this in the Discord server). Because of that, I’m not able to re-run the project right now, and I didn’t record any video when I initially tested it.

@rahul-vyas-dev
Copy link
Author

@M4dhav if you want any changes then let me know i am here for that

@M4dhav
Copy link
Contributor

M4dhav commented Nov 15, 2025

While the tests did pass, I cannot merge this without verifying that ISO 639-2 codes work. Alternatively, could you find me a source that confirms ISO 639-2 are supported by flutter_localizations ?

@rahul-vyas-dev
Copy link
Author

rahul-vyas-dev commented Nov 15, 2025

hey @M4dhav I verify the ARB messages using the check_arb.dart script, and the output looks correct. Here’s what I got:

dart "c:\Users\rahul\Resonate\tools\check_arb.dart"
Loaded ARB: lib/l10n/app_raj.arb
Locale: raj
Messages found: 362

  • title => रेज़ोनेट
  • noAvailableRoom => false{कोई आवण वालो रूम नी है} other{रूम री जानकारी नी है}}
    नीचे एक जोड़ण सूं शुरू करो!
  • noAvailableRoom#2 => false{कोई आवण वालो रूम नी है} other{रूम री जानकारी नी है}}
    नीचे एक जोड़ण सूं शुरू करो!
  • minutesAgo => other{1 मिनट पहलां}}
  • minutesAgo#2 => other{5 मिनट पहलां}}

Code that i have used

import 'dart:convert';
import 'dart:io';

void main(List<String> args) async {
  final path = args.isNotEmpty ? args.first : 'lib/l10n/app_raj.arb';
  final file = File(path);
  if (!await file.exists()) {
    stderr.writeln('File not found: $path');
    exit(2);
  }

  final content = await file.readAsString();
  Map<String, dynamic> json;
  try {
    json = jsonDecode(content) as Map<String, dynamic>;
  } catch (e) {
    stderr.writeln('Invalid JSON in $path: $e');
    exit(3);
  }

  stdout.writeln('Loaded ARB: $path');
  stdout.writeln('Locale: ${json['@@locale'] ?? '<none>'}');
  stdout.writeln(
    'Messages found: ${json.keys.where((k) => !k.startsWith('@')).length}',
  );
  stdout.writeln('');

  final tests = <String, Map<String, Object?>>{
    'title': {},
    'noAvailableRoom': {'isRoom': 'true'},
    'noAvailableRoom#2': {'isRoom': 'false'},
    'minutesAgo': {'count': 1},
    'minutesAgo#2': {'count': 5},
  };

  for (final entry in tests.entries) {
    final rawKey = entry.key.contains('#')
        ? entry.key.split('#').first
        : entry.key;
    final sampleName = entry.key;
    final argsForKey = entry.value;

    final raw = json[rawKey];
    if (raw == null) {
      stdout.writeln(' - $sampleName: <missing key in ARB>');
      continue;
    }

    final formatted = formatMessage(raw.toString(), argsForKey);
    stdout.writeln(' - $sampleName => $formatted');
  }
}

String formatMessage(String msg, Map<String, Object?> args) {
  var out = msg;

  final selectRe = RegExp(r'\{(\w+),\s*select,([\s\S]*?)\}');
  out = out.replaceAllMapped(selectRe, (m) {
    final varName = m[1]!;
    final body = m[2]!;
    final choice = _pickSelectChoice(body, args[varName]?.toString());
    return choice;
  });

  final pluralRe = RegExp(r'\{(\w+),\s*plural,([\s\S]*?)\}');
  out = out.replaceAllMapped(pluralRe, (m) {
    final varName = m[1]!;
    final body = m[2]!;
    final count = args[varName];
    final choice = _pickPluralChoice(body, count);
    return choice;
  });

  final placeholderRe = RegExp(r'\{(\w+)\}');
  out = out.replaceAllMapped(placeholderRe, (m) {
    final n = m[1]!;
    if (args.containsKey(n) && args[n] != null) return args[n].toString();
    return '{${n}}';
  });

  out = out.replaceAll(r'\n', '\n');
  return out;
}

String _pickSelectChoice(String body, String? value) {
  final tokenRe = RegExp(r'(\w+)\{([^}]*)\}');
  final matches = tokenRe.allMatches(body);
  String? other;
  for (final m in matches) {
    final k = m[1]!;
    final v = m[2]!;
    if (k == 'other') other = v;
    if (value != null && value == k) return v;
  }
  return other ?? '';
}

String _pickPluralChoice(String body, Object? countObj) {
  final count = (countObj is num) ? countObj.toInt() : null;
  final tokenRe = RegExp(r'(=?\d+|other)\{([^}]*)\}');
  final matches = tokenRe.allMatches(body);
  String? other;
  final map = <String, String>{};
  for (final m in matches) {
    final k = m[1]!;
    final v = m[2]!;
    map[k] = v;
    if (k == 'other') other = v;
  }
  if (count != null) {
    final eqKey = '=${count}';
    if (map.containsKey(eqKey))
      return map[eqKey]!.replaceAll('{count}', count.toString());
    if (count == 0 && map.containsKey('=0'))
      return map['=0']!.replaceAll('{count}', '0');
    if (count == 1 && map.containsKey('=1'))
      return map['=1']!.replaceAll('{count}', '1');
    return (other ?? '').replaceAll('{count}', count.toString());
  }
  return other ?? '';
}

@rahul-vyas-dev
Copy link
Author

Hey @M4dhav , if you’d prefer not to use the ISO 639-2 code “raj”, I can use the raj_IN format instead — it will work properly as well.
Please let me know your thoughts so I can follow the right approach.

@M4dhav
Copy link
Contributor

M4dhav commented Nov 18, 2025

Hey @M4dhav , if you’d prefer not to use the ISO 639-2 code “raj”, I can use the raj_IN format instead — it will work properly as well. Please let me know your thoughts so I can follow the right approach.

raj_IN does not make a difference, root issue is still that it is a 3 letter country code

@M4dhav
Copy link
Contributor

M4dhav commented Nov 18, 2025

Hey @rahul-vyas-dev I just checked your PR Locally, and the app does not, in fact, run with the raj localization added. You can verify this by trying to open the App Preferences page when the localization is present. Essentially that means that Flutter does not have support for 3 letter language codes via flutter_localization.

@rahul-vyas-dev
Copy link
Author

Hey @rahul-vyas-dev I just checked your PR Locally, and the app does not, in fact, run with the raj localization added. You can verify this by trying to open the App Preferences page when the localization is present. Essentially that means that Flutter does not have support for 3 letter language codes via flutter_localization.

working on it

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a559d9 and 60dbee1.

📒 Files selected for processing (1)
  • lib/main.dart (1 hunks)

lib/main.dart Outdated
Comment on lines 92 to 100
localeResolutionCallback: (locale, supportedLocales) {
if (locale != null && locale.languageCode == 'raj') {
return const Locale('raj');
}
for (final supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale?.languageCode) {
return supportedLocale;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was code added to main.dart?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion! The changes in main.dart were added because this branch includes the new Rajasthani (raj) language support. To enable that, the app needed an updated localeResolutionCallback and localization setup inside GetMaterialApp

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @M4dhav , if you have a better approach to resolve this, please let me know so that i can resolve this issue asap

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the preferred approach. Adding confguration for a specific language is not recommended. I do not think it is possible to add Rajasthani for now, and so I am closing the PR. Please feel free to reopen if you find an alternate way

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @M4dhav what if i use either 'rj' instead of 'raj' or BCP-47 ('raj-IN')
please let me know

@M4dhav M4dhav closed this Nov 18, 2025
@github-actions
Copy link
Contributor

PR Closed - Thank You, @rahul-vyas-dev!

  • If this PR was merged: Congratulations! Your contribution is now part of the project. 🚀
  • If this PR was closed without merging: Don’t worry! You can always improve it and submit again. 💪

We appreciate your effort and look forward to more contributions from you! 🤝

- Introduced a new localization file `raj_intl.dart` containing date patterns and symbols for the Rajasthani language.
- Implemented the `AppLocalizationsRaj` class extending `GlobalMaterialLocalizations` to provide localized strings and formats.
- Updated `main.dart` to include the Rajasthani localization delegate in the app's localization setup.
Added support for Rajesthani Language
@rahul-vyas-dev
Copy link
Author

“Hey @M4dhav , can you please reopen this PR? I have fixed the issue and can update it further.

@M4dhav M4dhav reopened this Nov 19, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (6)
untranslated.txt (1)

72-104: Critical: Three-letter ISO 639-2 language code 'raj' is not supported by Flutter.

Per the PR discussion and maintainer testing, the app crashes when the 'raj' localization is present, specifically when opening the App Preferences page. The root issue is that flutter_localizations supports ISO 639-1 two-letter language codes, but Rajasthani uses the ISO 639-2 three-letter code 'raj'.

According to web search results referenced in past comments, flutter_localizations does not include ISO 639-2 code "raj" in its built-in supported languages.

This is a blocking issue that prevents the PR from being merged. The maintainer has confirmed this approach cannot work and closed the PR accordingly. Adding the locale to this file (and all other localization files) will not resolve the underlying Flutter framework limitation.

lib/main.dart (2)

15-15: Critical: Import for unsupported three-letter language code.

This import is part of the attempt to add Rajasthani using the three-letter code "raj", which flutter_localizations does not support. The maintainer confirmed the app fails to run with this localization present.


89-89: Critical: Registering delegate for unsupported locale causes app crashes.

The maintainer tested this change locally and confirmed the app fails to run when the 'raj' localization is present, specifically crashing when opening the App Preferences page.

Per past review comments, flutter_localizations does not support ISO 639-2 three-letter language codes like 'raj', and the maintainer stated "This is not the preferred approach. Adding configuration for a specific language is not recommended".

Required action: Remove this delegate registration until a viable solution for three-letter language codes is found or an alternative two-letter code approach is identified.

lib/l10n/app_localizations.dart (1)

13-13: Critical: Adding 'raj' locale violates Flutter's language code requirements.

These changes integrate the 'raj' locale throughout the localization system, but flutter_localizations does not support ISO 639-2 three-letter language codes. The maintainer confirmed the app fails to run with this localization present.

Adding Locale('raj') to supportedLocales and the lookup logic does not overcome the underlying Flutter framework limitation. The built-in Material and Cupertino localizations will fail when attempting to load resources for the three-letter code.

Also applies to: 103-103, 2482-2482, 2497-2498

lib/l10n/raj_intl.dart (1)

209-245: Critical: Custom delegate for unsupported three-letter language code.

This custom LocalizationsDelegate attempts to provide Material localizations for the 'raj' locale, but flutter_localizations does not support ISO 639-2 three-letter language codes. The maintainer confirmed the app crashes when this localization is present.

While creating a custom delegate is the correct approach for adding app-specific translations, it cannot overcome Flutter's built-in limitation regarding three-letter language codes in the Material and Cupertino localization delegates.

lib/l10n/app_localizations_raj.dart (1)

1-1306: Note: This file cannot be used until the three-letter language code issue is resolved.

While this file provides comprehensive Rajasthani translations (aside from the incomplete sections noted in other comments), the fundamental issue is that flutter_localizations does not support the ISO 639-2 three-letter code 'raj'. The maintainer confirmed the app crashes when this localization is present.

The translation work here is valuable, but the file cannot be integrated until either:

  1. A two-letter language code alternative is identified for Rajasthani
  2. Flutter adds support for three-letter ISO 639-2 codes
  3. An alternative localization approach is developed
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60dbee1 and 23009fd.

📒 Files selected for processing (5)
  • lib/l10n/app_localizations.dart (5 hunks)
  • lib/l10n/app_localizations_raj.dart (1 hunks)
  • lib/l10n/raj_intl.dart (1 hunks)
  • lib/main.dart (2 hunks)
  • untranslated.txt (1 hunks)
🔇 Additional comments (1)
lib/l10n/raj_intl.dart (1)

12-57: Review date format patterns for Rajasthani conventions.

The date format patterns defined here should follow Rajasthani/Indian conventions. Please verify these patterns are appropriate for Rajasthani speakers, particularly:

  • Date ordering (d.M.y vs. other formats)
  • Date/time separators
  • 24-hour time format usage

Consider consulting with native Rajasthani speakers or reviewing similar Indian language implementations to ensure cultural appropriateness.

Comment on lines 391 to 400
String get hide => 'Remove';

@override
String get removeRoom => 'Remove Room';

@override
String get removeRoomFromList => 'Remove from list';

@override
String get removeRoomConfirmation => 'Are you sure you want to remove this upcoming room from your list?';
Copy link

@coderabbitai coderabbitai bot Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Major: Additional untranslated strings remain in English.

Several strings throughout the file remain in English:

Room management (lines 391-400):

  • 'Remove', 'Remove Room', 'Remove from list', 'Are you sure you want to remove this upcoming room from your list?'

Search functionality (lines 554, 718-740):

  • Line 554: 'Failed to search rooms. Please try again.'
  • Lines 718-740: 'Search rooms...', 'Searching rooms...', 'Clear search', 'Search Error', 'Failed to search rooms. Please try again.', 'Failed to search upcoming rooms. Please try again.', 'Search', 'Clear'

Room removal feedback (lines 1227-1230):

  • 'Failed to remove room', 'Room removed from your list successfully'

These should be translated to Rajasthani for consistency with the rest of the file.

Also applies to: 554-554, 718-740, 1227-1230

🤖 Prompt for AI Agents
In lib/l10n/app_localizations_raj.dart around lines 391-400, 554, 718-740, and
1227-1230 the listed getters still return English strings; replace each English
string with the correct Rajasthani translation (Hide/Remove, Remove Room, Remove
from list, confirmation sentence, search-related strings, and room removal
feedback) by updating the getter return values to their Rajasthani equivalents,
preserve punctuation and interpolation, keep @override annotations intact, and
run the localization/formatting tests or l10n extraction to verify no key/name
changes broke consumers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok working on it

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul-vyas-dev, sounds good! Let me know if you need any help with the Rajasthani translations. 👍

Comment on lines 59 to 206
const rajDateSymbols = {
'NAME': 'nn',
'ERAS': <dynamic>['f.Kr.', 'e.Kr.'],

'ERANAMES': <dynamic>['før Kristus', 'etter Kristus'],
'NARROWMONTHS': <dynamic>[
'J',
'F',
'M',
'A',
'M',
'J',
'J',
'A',
'S',
'O',
'N',
'D',
],
'STANDALONENARROWMONTHS': <dynamic>[
'J',
'F',
'M',
'A',
'M',
'J',
'J',
'A',
'S',
'O',
'N',
'D',
],
'MONTHS': <dynamic>[
'januar',
'februar',
'mars',
'april',
'mai',
'juni',
'juli',
'august',
'september',
'oktober',
'november',
'desember',
],
'STANDALONEMONTHS': <dynamic>[
'januar',
'februar',
'mars',
'april',
'mai',
'juni',
'juli',
'august',
'september',
'oktober',
'november',
'desember',
],
'SHORTMONTHS': <dynamic>[
'jan.',
'feb.',
'mar.',
'apr.',
'mai',
'jun.',
'jul.',
'aug.',
'sep.',
'okt.',
'nov.',
'des.',
],
'STANDALONESHORTMONTHS': <dynamic>[
'jan',
'feb',
'mar',
'apr',
'mai',
'jun',
'jul',
'aug',
'sep',
'okt',
'nov',
'des',
],
'WEEKDAYS': <dynamic>[
'søndag',
'mandag',
'tirsdag',
'onsdag',
'torsdag',
'fredag',
'lørdag',
],
'STANDALONEWEEKDAYS': <dynamic>[
'søndag',
'mandag',
'tirsdag',
'onsdag',
'torsdag',
'fredag',
'lørdag',
],
'SHORTWEEKDAYS': <dynamic>[
'søn.',
'man.',
'tir.',
'ons.',
'tor.',
'fre.',
'lør.',
],
'STANDALONESHORTWEEKDAYS': <dynamic>[
'søn.',
'man.',
'tir.',
'ons.',
'tor.',
'fre.',
'lør.',
],
'NARROWWEEKDAYS': <dynamic>['S', 'M', 'T', 'O', 'T', 'F', 'L'],
'STANDALONENARROWWEEKDAYS': <dynamic>['S', 'M', 'T', 'O', 'T', 'F', 'L'],
'SHORTQUARTERS': <dynamic>['K1', 'K2', 'K3', 'K4'],
'QUARTERS': <dynamic>['1. kvartal', '2. kvartal', '3. kvartal', '4. kvartal'],
'AMPMS': <dynamic>['a.m.', 'p.m.'],
'DATEFORMATS': <dynamic>[
'EEEE d. MMMM y',
'd. MMMM y',
'd. MMM y',
'dd.MM.y',
],
'TIMEFORMATS': <dynamic>['HH:mm:ss zzzz', 'HH:mm:ss z', 'HH:mm:ss', 'HH:mm'],
'AVAILABLEFORMATS': null,
'FIRSTDAYOFWEEK': 0,
'WEEKENDRANGE': <dynamic>[5, 6],
'FIRSTWEEKCUTOFFDAY': 3,
'DATETIMEFORMATS': <dynamic>[
'{1} {0}',
'{1} \'kl\'. {0}',
'{1}, {0}',
'{1}, {0}',
],
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Date symbols use Norwegian language instead of Rajasthani.

The rajDateSymbols map contains Norwegian language text rather than Rajasthani:

  • Eras (lines 61-63): "f.Kr.", "e.Kr.", "før Kristus", "etter Kristus" are Norwegian
  • Months (lines 92-147): "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember" are Norwegian
  • Weekdays (lines 148-183): "søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag" are Norwegian
  • Quarters (line 187): "kvartal" is Norwegian

These should be translated to Rajasthani to match the locale being implemented. For example, months in Rajasthani could use Devanagari script similar to the translations in app_localizations_raj.dart (e.g., lines 619-652 which use proper Rajasthani text like "जन", "फर", "मार्च", etc.).

🤖 Prompt for AI Agents
In lib/l10n/raj_intl.dart around lines 59 to 206, the date symbol map currently
contains Norwegian values (eras, era names, months, short months, standalone
months, weekdays, short weekdays, quarters, etc.); replace those Norwegian
strings with the correct Rajasthani equivalents (use Devanagari forms from
app_localizations_raj.dart lines ~619-652 as reference for month and weekday
names/abbreviations), update ERAS and ERANAMES to Rajasthani text, translate
SHORTMONTHS/STANDALONESHORTMONTHS and WEEKDAYS/STANDALONEWEEKDAYS/SHORTWEEKDAYS
accordingly, and change QUARTERS/SHORTQUARTERS to Rajasthani terms so all locale
strings consistently reflect the Rajasthani locale.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
untranslated.txt (1)

70-104: Raj entry in untranslated.txt is structurally fine; confirm it reflects your current translation status

The new "raj" block is well‑formed and its keys line up with the corresponding getters in AppLocalizationsRaj (e.g., appPreferences, transcriptionModel*, whisperModel*, search*, hide/remove*). That’s good for keeping tooling like check_arb.dart in sync.

However, since this file appears to track untranslated keys, please double‑check that all of these Raj strings are indeed still intentionally English (many of them are in app_localizations_raj.dart). If you later translate them, remember to regenerate/update this file so it doesn’t list stale “untranslated” entries for raj.

lib/l10n/raj_intl.dart (3)

245-252: Use the Raj locale for shortMonthDayFormat to keep date formats consistent

All other date formats here are created with localeName, but shortMonthDayFormat omits it:

shortMonthDayFormat: intl.DateFormat('MMM d'),

This will fall back to the default locale (typically en_US), which is inconsistent with the Raj locale and your custom date symbols.

Recommend:

-        shortMonthDayFormat: intl.DateFormat('MMM d'),
+        shortMonthDayFormat: intl.DateFormat('MMM d', localeName),

This keeps all date formats aligned with the active Raj locale.


422-423: Consider using a non‑English script category for Raj (Devanagari) text

@override
ScriptCategory get scriptCategory => ScriptCategory.englishLike;

Rajasthani here is written in Devanagari, not Latin. For better typography and spacing, it’s usually preferable to align scriptCategory with whatever Flutter uses for other Devanagari‑based locales (e.g., Hindi), rather than englishLike.

I’d suggest checking the GlobalMaterialLocalizations implementation for hi (or another Indic locale) and mirroring that ScriptCategory to ensure consistent layout.


221-258: Rename this Material‑localizations class to avoid confusion with the app‑level AppLocalizationsRaj

This file defines:

class AppLocalizationsRaj extends GlobalMaterialLocalizations { ... }
static const LocalizationsDelegate<MaterialLocalizations> delegate =
    _AppLocalizationsRajs();

while lib/l10n/app_localizations_raj.dart also defines a completely different:

class AppLocalizationsRaj extends AppLocalizations { ... }

Because they live in different libraries you don’t immediately get a compile error, but:

  • It’s very easy for future imports to accidentally pull in the wrong AppLocalizationsRaj.
  • The name strongly suggests this is the app‑string localization, whereas this class actually provides Material localizations.

To reduce confusion and avoid future symbol collisions, I recommend renaming the Material one here, for example:

-class AppLocalizationsRaj extends GlobalMaterialLocalizations {
+class RajMaterialLocalizations extends GlobalMaterialLocalizations {
@@
-  static const LocalizationsDelegate<MaterialLocalizations> delegate =
-      _AppLocalizationsRajs();
+  static const LocalizationsDelegate<MaterialLocalizations> delegate =
+      _RajMaterialLocalizationsDelegate();

…and rename _AppLocalizationsRajs to _RajMaterialLocalizationsDelegate, updating main.dart (or wherever you register the delegate) to reference RajMaterialLocalizations.delegate instead.

This keeps the naming clear: AppLocalizations* for app strings, *MaterialLocalizations for Material UI.

Also applies to: 260-273, 487-488

lib/l10n/app_localizations_raj.dart (1)

319-365: Several Raj strings remain English (likely intentional but worth confirming)

In this class a number of keys that were explicitly added for Raj in untranslated.txt are still English, for example:

  • App preferences / transcription model section:
    • appPreferences => 'App Preferences'
    • transcriptionModel => 'Transcription Model'
    • transcriptionModelDescription, all whisperModel* labels and descriptions, modelDownloadInfo
  • Room removal & search:
    • hide => 'Remove', removeRoom => 'Remove Room', removeRoomFromList => 'Remove from list',
      removeRoomConfirmation => 'Are you sure you want to remove this upcoming room from your list?'
    • searchFailed, searchRooms, searchingRooms, clearSearch, searchError,
      searchRoomsError, searchUpcomingRoomsError, search, clear
    • failedToRemoveRoom, roomRemovedSuccessfully

If the intent is full Raj UI coverage, these will continue to appear in English even when the locale is set to raj. That’s consistent with the new "raj" block in untranslated.txt, but you may want to either:

  • Translate them now and regenerate untranslated.txt, or
  • Explicitly treat them as known/untranslated for this release so expectations are clear.

No functional bug here, just a content/UX detail to confirm.

Also applies to: 391-403, 404-405, 414-421, 430-431, 554-567, 718-739, 1227-1230

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60dbee1 and b05fe6f.

📒 Files selected for processing (5)
  • lib/l10n/app_localizations.dart (5 hunks)
  • lib/l10n/app_localizations_raj.dart (1 hunks)
  • lib/l10n/raj_intl.dart (1 hunks)
  • lib/main.dart (2 hunks)
  • untranslated.txt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • lib/l10n/app_localizations.dart
  • lib/main.dart

@rahul-vyas-dev
Copy link
Author

hey @M4dhav review it and Sorry for making changes in the main.dart file, but it was necessary to add the custom class instance to support the Raj (three-letter) language code.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
lib/l10n/app_localizations_raj.dart (3)

553-553: Major: English text remains untranslated.

Line 553 still contains English text instead of Rajasthani: 'Failed to search rooms. Please try again.'

This was flagged in a previous review but has not been addressed. Please translate this to Rajasthani to match the rest of the localization file.


717-738: Major: Multiple search-related strings remain in English.

Lines 717-738 contain English text instead of Rajasthani translations:

  • 'Search rooms...'
  • 'Searching rooms...'
  • 'Clear search'
  • 'Search Error'
  • 'Failed to search rooms. Please try again.'
  • 'Failed to search upcoming rooms. Please try again.'
  • 'Search'
  • 'Clear'

These were flagged in a previous review but remain untranslated. Please translate all of these to Rajasthani for consistency with the rest of the file.


1226-1229: Major: Room removal feedback strings remain in English.

Lines 1226 and 1229 still contain English text:

  • Line 1226: 'Failed to remove room'
  • Line 1229: 'Room removed from your list successfully'

These were flagged in a previous review but have not been translated to Rajasthani. Please complete the translation.

🧹 Nitpick comments (2)
lib/l10n/raj_intl.dart (2)

251-251: Minor: Missing locale parameter for consistency.

Line 251 initializes shortMonthDayFormat without a locale parameter:

shortMonthDayFormat: intl.DateFormat('MMM d'),

For consistency with the other date format initializations (lines 245-250), consider adding the localeName parameter:

-        shortMonthDayFormat: intl.DateFormat('MMM d'),
+        shortMonthDayFormat: intl.DateFormat('MMM d', localeName),

275-760: Consider translating Material widget strings to Rajasthani.

The Material localization strings (lines 275-760) are currently in English, such as:

  • Line 276: 'More'
  • Line 282: 'Alert'
  • Line 289: 'Back'
  • Line 292: 'CANCEL'

For a complete Rajasthani localization experience, these Material widget labels could be translated. However, if these are intentionally kept in English (e.g., following framework conventions or for technical reasons), this is acceptable.

Could you clarify whether Material widget strings should remain in English or be translated to Rajasthani?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b05fe6f and c6e7e52.

📒 Files selected for processing (2)
  • lib/l10n/app_localizations_raj.dart (1 hunks)
  • lib/l10n/raj_intl.dart (1 hunks)
🔇 Additional comments (3)
lib/l10n/raj_intl.dart (3)

7-10: LGTM: Import alias conflict resolved.

The conflicting import aliases have been fixed. The imports now use distinct prefixes (intl and symbols), which resolves the previous compile-time error.


59-219: LGTM: Date symbols now use Rajasthani.

The date symbols have been corrected from Norwegian to Rajasthani/Devanagari script. The eras, months, weekdays, and quarters are now properly localized.


260-273: No naming conflict exists. The original review comment misidentifies how Dart's import system works.

The two AppLocalizationsRaj classes exist in separate namespaces:

  • lib/l10n/raj_intl.dart: Material localization delegate (imported directly in main.dart)
  • lib/l10n/app_localizations_raj.dart: App-specific localizations (imported within app_localizations.dart, never directly exposed to main.dart)

When main.dart uses AppLocalizationsRaj.delegate (line 89), it accesses the Material version from raj_intl.dart. When app_localizations.dart instantiates AppLocalizationsRaj() (line 2498), it uses the app-specific version from app_localizations_raj.dart. These operate in different scopes and never conflict.

This follows standard Flutter localization patterns where Material localization files (*_intl.dart) and app-specific localization files (app_localizations_*.dart) coexist with identical naming conventions.

Likely an incorrect or invalid review comment.

@M4dhav
Copy link
Contributor

M4dhav commented Nov 22, 2025

Please change base branch of PR to Dev

@rahul-vyas-dev rahul-vyas-dev changed the base branch from master to dev November 22, 2025 08:57
@rahul-vyas-dev
Copy link
Author

hey @M4dhav review please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rajasthani

2 participants