Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation comments to the generated translation file #218

Open
fa0311 opened this issue Apr 29, 2024 · 3 comments
Open

Add Documentation comments to the generated translation file #218

fa0311 opened this issue Apr 29, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@fa0311
Copy link

fa0311 commented Apr 29, 2024

Motivation

I migrated from gen_l10n to slang, and the generated documentation is better in gen_l10n than in slang.
Since I am a native Japanese speaker, I need to be able to quickly preview member variables in Japanese, not just their names.

gen_l10n generates the following.

  /// No description provided for @title.
  ///
  /// In en, this message translates to:
  /// **'Title'**
  ///
  /// In ja, this message translates to:
  /// **'タイトル'**
  String get title;

image

slang generates the following.

	String get title => 'title';

image

@fa0311 fa0311 added the enhancement New feature or request label Apr 29, 2024
@Tienisto
Copy link
Member

I don't know if this is scalable if you have many locales. The generated file would be very big.

@aitaro
Copy link

aitaro commented Jun 5, 2024

How about limiting this to only the base_locale? This functionality is useful to understand if the rendering is appropriate just by looking at the code.

@Tienisto
Copy link
Member

Tienisto commented Jun 5, 2024

I always jump to the declaration when I want to see the base translation (which is ctrl+left click). Don't know if the benefit is great enough to sacrifice the bigger file size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants