Is there a way to configure multiple instances of the same provider?
I ran into a case where some translators use xliff 1.2, but others work with 2.0 and discovered that there isn't a way to have multiple copies of the xliff provider configured for those, as far as I can tell. It's possible to work around by updating the one provider on an as needed basis, but it complicates the translation process and makes it more difficult for the client, as they wouldn't necessarily know which version needs to be used for each job.
yeah at the moment the provider config is global and not against the translation set.
You can make the format editor defined and then the editor picks it at translation time - but I can see this isn't ideal
I thought I had a really clever way of doing this by overriding the xliff provider class, but it doesn't quite work (one of the js files is hardwired to the settings) so let me go off and fix that, and then there might be a quick (5 lines of code) way to create a new provider so you can have one xliff 1.2 and the other xliff 2.0
there was a little thing we needed to fix before this was possible - but we have done that now, so if you upgrade your version of the xliff provider to 2.1.6
(also increment the clientDependency version to clear your cache)
You can create a clone on the provider in code, like below :
namespace YourAppNameSpace
{
public class XliifCloneProvider : SimpleFileProvider, ITranslationProvider
{
public new string Name { get { return "Xliff Provider 2"; } }
public new string Alias { get { return "xliffprovider2"; } }
public new Guid Key { get { return Guid.Parse("F2D68F09-0132-4E7E-8802-38EBE0727F39"); } }
public XliifCloneProvider(TranslationManagerContext context, ILogger logger)
: base(context, logger)
{
}
}
}
if you have this in your project somewhere - then you should see a second xliff provider pop-up.
you can configure these independently and you can assign diffrent default providers to different translation sets
Is there a way to configure multiple instances of the same provider?
I ran into a case where some translators use xliff 1.2, but others work with 2.0 and discovered that there isn't a way to have multiple copies of the xliff provider configured for those, as far as I can tell. It's possible to work around by updating the one provider on an as needed basis, but it complicates the translation process and makes it more difficult for the client, as they wouldn't necessarily know which version needs to be used for each job.
Am I missing something?
Hi Jesse,
yeah at the moment the provider config is global and not against the translation set.
You can make the format editor defined and then the editor picks it at translation time - but I can see this isn't ideal
I thought I had a really clever way of doing this by overriding the xliff provider class, but it doesn't quite work (one of the js files is hardwired to the settings) so let me go off and fix that, and then there might be a quick (5 lines of code) way to create a new provider so you can have one xliff 1.2 and the other xliff 2.0
Hi Jesse,
there was a little thing we needed to fix before this was possible - but we have done that now, so if you upgrade your version of the xliff provider to 2.1.6
https://www.nuget.org/packages/Jumoo.TranslationManager.Providers.Xliff/
(also increment the clientDependency version to clear your cache)
You can create a clone on the provider in code, like below :
if you have this in your project somewhere - then you should see a second xliff provider pop-up.
you can configure these independently and you can assign diffrent default providers to different translation sets
Kevin
is working on a reply...