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

Feature: Multi base file support #30

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Feature: Multi base file support #30

merged 2 commits into from
Jun 20, 2024

Conversation

shovelmn12
Copy link
Contributor

With the extra code we can now generate different base files:

messages.i18n.yaml
messages_de.i18n.yaml
otherMessages.i18n.yaml
otherMessages_de.i18n.yaml

Will now generate:

messages.i18n.dart
messages_de.i18n.dart
otherMessages.i18n.dart
otherMessages_de.i18n.dart

As I added code to compare base file name, when running the builder will search for "defaultFile" with no "_" and that current file starts with fileName.

https://github.com/shovelmn12/i18n/blob/55a8467a530d99d75911c560ca3d573b864fbbf1/lib/builder.dart#L43

@shovelmn
Copy link

@MohiuddinM ?

Copy link
Owner

@MohiuddinM MohiuddinM left a comment

Choose a reason for hiding this comment

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

Sorry, I didn't get a notification for this PR earlier.

CHANGELOG.md Outdated Show resolved Hide resolved
lib/builder.dart Outdated Show resolved Hide resolved
@shovelmn12
Copy link
Contributor Author

@MohiuddinM done :)

@shovelmn12
Copy link
Contributor Author

shovelmn12 commented Jun 20, 2024

BTW just to make it cleaner we can add a whateverName_WeWant.base.i18n.yml so the base marks the base file and it matchaes on the name

If we do that each dev can decide on whatever file name formatting they want ....

messages.base.i18n.yaml
messages.de.i18n.yaml
otherStrings.base.i18n.yaml
otherStrings.de.i18n.yaml
other_strings.base.i18n.yaml
other_strings.de.i18n.yaml

just looks a bit cleaner and more flexible?? donnow just a thought

@MohiuddinM
Copy link
Owner

BTW just to make it cleaner we can add a whateverName_WeWant.base.i18n.yml so the base marks the base file and it matchaes on the name

If we do that each dev can decide on whatever file name formatting they want ....

messages.base.i18n.yaml
messages.de.i18n.yaml
otherStrings.base.i18n.yaml
otherStrings.de.i18n.yaml
other_strings.base.i18n.yaml
other_strings.de.i18n.yaml

just looks a bit cleaner and more flexible?? donnow just a thought

Ok, I will look into it.

@MohiuddinM MohiuddinM closed this Jun 20, 2024
@MohiuddinM MohiuddinM reopened this Jun 20, 2024
@MohiuddinM MohiuddinM merged commit 55ad0ff into MohiuddinM:master Jun 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants