A brief description of your feature request goes here.
Umbraco 8 allows for manifest files to be placed "where ever" under app_plugins like App_Plugins/Plugin/Feature1/f1.manifest and App_Plugins/Plugin/Feature2/f2.manifest and so forth.
You could then build a plugin that can have multiple features.
Lang-files on the other hand can only live in one place -- App_Plugins/Plugin/Lang/*.xml
From our own part of the woods, we a building a lot of internal stuff that we reuse, and instead of having 20-30 Company.This.That and Company.Some.Thing folders, we would like to have:
App_Plugins/Company/This/That and App_Plugins/Company/Some/Thing - and have lang-files in subfolders, together with the respective manifest files
https://github.com/umbraco/Umbraco-CMS/pull/4454 expanded the name of the lang files resolved. This could easily be changed to look for xml files in lang folder :
appPlugins
.GetDirectories("lang", SearchOption.AllDirectories)
.SelectMany(x => x.GetFiles("*.xml", SearchOption.TopDirectoryOnly))
Another aspect of this could be to allow a "lang"-setting in the package manifest.
{
"lang": ["~/App_Plugins/Company/This/That/lang"],
"propertyEditors": [],
"gridEditors": [],
"parameterEditors": [],
"javascript": ["~/App_Plugins/Company/This/That/js/controllers.js"],
"css": []
}
What would people prefer? Expanding the searching to include subfolders, or implement lang-property in manifest?
You can update files in ~/Config/Lang - isn't that what you need?
So the hierarchy is:
~/Umbraco/config/Lang~/Config/Lang (overrules ~/Umbraco/config/Lang)~/App_Plugins/{myPlugin}/Lang (overrules ~/Umbraco/config/Lang and ~/Config/Lang)I do understand the requirement you have here, but it seems like a bit of an edge case and technically you can already handle this in ~/Config/Lang files.
@nul800sebastiaan it's all about only shipping the needed files :)
I can easily distribute new plugin/lang/*.xml files, but I can't easily edit the files in the places you list -- other than the "only root-folders" under App_Plugins
I just don't think it makes sense to have the manifest scattered allover the places, if you can't have all the required files in the same place as the manifest. Just seems a bit out of sync ๐
I just changed the title to clarify a bit
If the package.manifest can live in multiple places, then the lang folder should be possible to live in the same folder as the package.manifest
so a plugin can live in a structure like
/App_Plugins/Newsletters/Templates/package.manifest
/App_Plugins/Newsletters/Templates/lang/da-DK.xml
/App_Plugins/Newsletters/Composer/package.manifest
/App_Plugins/Newsletters/Composer/lang/da-DK.xml
I agree, that it should be possible to have the lang-folder located next to the package.manifest file.
This would allow us to ship our default/"out-of-the-box" components inside a folder, so they dont get mixed up with customer-specific plugins.
I agree, it makes sense to do this.
Alright thanks for the feedback
I can't easily edit the files in the places you list
Why not? ๐
I'll make sure to discuss this in our regular meetings at HQ soon though, I'm probably just overthinking it and we should probably just do it.
Why not? ๐
because โIโmโ a nuget-package ;-)
Hi @soreng - great seeing you at the BBQ last week!
I forgot to talk to you about this one, but we've had a chat at HQ about it. Funnily enough, I had interpreted your feature request completely wrong and after reading it a few more times and talking about it I now do understand what you're trying to do.
The example you provided by updating the default location of lang file using the package.manifest file seems like a really good one. We would still leave the default location as it is, but by making it explicit you can put it anywhere you want.
Your example was:
{
"lang": ["~/App_Plugins/Company/This/That/lang"],
"propertyEditors": [],
"gridEditors": [],
"parameterEditors": [],
"javascript": ["~/App_Plugins/Company/This/That/js/controllers.js"],
"css": []
}
I'm not sure why this is an array though, I don't see the point of providing multiple locations for a package to get the translation files from. Maybe I'm missing something, but in my mind it should look like:
{
"lang": "~/App_Plugins/Company/This/That/lang",
"propertyEditors": [],
"gridEditors": [],
"parameterEditors": [],
"javascript": ["~/App_Plugins/Company/This/That/js/controllers.js"],
"css": []
}
In any case, we'd love for someone to work on this, it should hopefully be a pretty straight-forward and small change to make the location of the language files configurable from package.manifest.
Hi @soreng,
We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.
For more information about issues and states, have a look at this blog post
Thanks muchly, from your friendly PR team bot :-)
hi @nul800sebastiaan
Great seeing you too - as always
I'm glad the examples helped. To only reason it's an array, was that everything else in the manifest is arrays ;)
Been looking into this... I daresay it would make the implementation a whole lot simpler if we simply look for Lang directories in all sub directories of App_Plugins (much in line with how we look for package.manifest files. Obviously this will have a slight performance impact on startup if the installed plugins have a gazillion sub directories, but for "normal" use it shouldn't be noticeable.
If we can go with this solution I've got it ready for a PR.
"Just" looking for Lang files folders makes a whole lotta sense to me ๐
@greystate that is Lang folders ๐
Dang it - corrected! ๐
PR in #6153
@nul800sebastiaan not the PR guys have been by, but they opted for the "simple" solution
Would you prefer it as is, or should it support the manifest-setting instead (or both?)
I've left questions on the PR.
Most helpful comment
Fixed in https://github.com/umbraco/Umbraco-CMS/pull/6153