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

Is the args skippable in some language #281

Open
TacticalTwerking opened this issue Feb 14, 2025 · 0 comments
Open

Is the args skippable in some language #281

TacticalTwerking opened this issue Feb 14, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@TacticalTwerking
Copy link

Hi there! thanks for making this awesome lib, I'm currently working on a new project and using the old language resource files, to do so, I will need to edit those files to make them compatible with Slang. so here's my question.

Let's say I need to support two languages like below:

en.i18n.json
{ "greetings" : "hello" }

es.i18n.json
{ "greetings" : "hola $amigo" }

as you can see, the es part contains the same key but it has an argument that needs to be filled in, when I run the slang command, it generates both *.g.dart files, but gets an error in the strings_es.g.dart file, it says:
Class 'TranslationsES' can't define field 'greetings' and have method 'Translations. greetings' with the same name.

any help thanks

@TacticalTwerking TacticalTwerking changed the title Is the args skippable with the same key? Is the args skippable in some language Feb 14, 2025
@Tienisto Tienisto added the enhancement New feature or request label Feb 14, 2025
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

2 participants