meteor-messageformat icon indicating copy to clipboard operation
meteor-messageformat copied to clipboard

Smart package support incomplete

Open gadicc opened this issue 11 years ago • 4 comments

Currently, if you create packages in your app, there is no problem to translate them from inside the app. What's not clear is how a package author (who need translatable templates), can best include his/her translations in the package itself. Currently, there is no clear distinction between package translations and app translations... ideally the former should not appear in the /translate page or in the translatable collection.

Ref : https://github.com/gadicc/meteor-messageformat/issues/8#issuecomment-51309681

gadicc avatar Aug 06 '14 09:08 gadicc

@gadicc thanks for the reply. Yes, "app level" strings works at "package level", but is possible to use mf_extract.js to add strings also from projRoot + '/packages/my_custom_package/* ?

grigio avatar Aug 06 '14 12:08 grigio

If I'm not mistaken (correct me if you find otherwise), this should work without a problem. But as discussed, it gets added at an app level.

gadicc avatar Aug 06 '14 12:08 gadicc

Currently strings in ./packages/custom_pkg aren't added. It seems to be fixed editing https://github.com/gadicc/meteor-messageformat/blob/master/cli/mf_extract.js

from:

var walker  = walk.walk('.', {
    followLinks: false,
    filters: ["packages"]
});

to:

var walker  = walk.walk('.', {
    followLinks: false
});

Would you accept a patch?

grigio avatar Aug 06 '14 13:08 grigio

Sorry, my bad. You reminded me now that we intentionally skip the package dir because of https://github.com/gadicc/meteor-messageformat/issues/21. This needs to be sorted out properly, so hold off with the patch and we'll try get a proper solution for this out soon.

gadicc avatar Aug 06 '14 13:08 gadicc