-
Notifications
You must be signed in to change notification settings - Fork 39
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
added support for flutter 'lib\' dir #700
Conversation
harrowmykel
commented
Aug 15, 2023
- This pull request adds support for flutter 'lib/' directory
- I’ve reviewed the contributor guide and applied the relevant portions to this PR.
I would like to keep the |
With this PR you can give the program any directory and it will parse all
the dart files in the directory and sub directories for you.
…On Mon, 21 Aug 2023, 15:35 Moritz ***@***.***> wrote:
I would like to keep the intl_translation package independent of Flutter
implementation details, what are you trying to achieve exactly which can't
be fixed with the current setup?
—
Reply to this email directly, view it on GitHub
<#700 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFLTOBK2CMHD5FHJJD2MFLTXWNPZHANCNFSM6AAAAAA3QNOUAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This is already now possible using glob syntax, see the readme. Or am I missing something? |
The glob sythax does not do the subfolders
…On Tue, 22 Aug 2023, 16:13 Moritz ***@***.***> wrote:
This is already now possible using glob syntax, see the readme. Or am I
missing something?
—
Reply to this email directly, view it on GitHub
<#700 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFLTOBJ2XM25VVU2BMMSGNLXWS5BFANCNFSM6AAAAAA3QNOUAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The glob syntax is a bash feature, so for example using |
@@ -1,3 +1,6 @@ | |||
## 0.19.1-dev | |||
* Added support for Flutter `lib/` folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove references to Flutter
@@ -18,6 +18,15 @@ dart run intl_translation:extract_to_arb --output-dir=target/directory \ | |||
my_program.dart more_of_my_program.dart | |||
``` | |||
|
|||
This support passing a folder directory to it that contains `.dart` files. The code will automatically extract all `.dart` files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This support passing a folder directory to it that contains `.dart` files. The code will automatically extract all `.dart` files | |
This supports passing a folder directory that contains `.dart` files. The code will automatically extract all `.dart` files |
@@ -18,6 +18,15 @@ dart run intl_translation:extract_to_arb --output-dir=target/directory \ | |||
my_program.dart more_of_my_program.dart | |||
``` | |||
|
|||
This support passing a folder directory to it that contains `.dart` files. The code will automatically extract all `.dart` files | |||
in the folder AND its subfolders as well. This means it can be used for flutter `lib/` folder as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the folder AND its subfolders as well. This means it can be used for flutter `lib/` folder as well. | |
in the folder and its subfolders. |
@@ -99,6 +102,11 @@ void main(List<String> args) { | |||
help: "Fail for messages that don't have a description.", | |||
callback: (val) => extract.descriptionRequired = val, | |||
); | |||
parser.addOption( | |||
'lib-dir', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a more general name, such as input
or similar?
@@ -30,3 +30,51 @@ String _relativeToBase(String base, String filename) { | |||
return filename; | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a simpler
Directory(pathGivenByUser)
.listSync(recursive: true)
.whereType<File>()
.where((element) => element.path.endsWith('.dart'))
.toList()
This would even by synchronous.
///by adding cache functionality as well as helper | ||
///methods to FileSystemEntity | ||
|
||
class FFileSystemEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be unnecessary with the change above.
@@ -1,5 +1,5 @@ | |||
name: intl_translation | |||
version: 0.19.0-dev | |||
version: 0.19.1-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just leave it at 0.19.0-dev
while this package is not published.
PR HealthPackage publish validation ✔️Details
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. License Headers ✔️Details
All source files should start with a license header. Unrelated files missing license headers
Changelog Entry ✔️Details
Changes to files need to be accounted for in their respective changelogs. Coverage
|
File | Coverage |
---|---|
pkgs/intl_translation/bin/extract_to_arb.dart | 💔 Not covered |
pkgs/intl_translation/lib/src/directory_utils.dart | 💔 Not covered |
pkgs/intl_translation/lib/src/ffile_system_entity.dart | 💔 Not covered |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check
Closing as there is no activity. |