Replies: 20 comments 15 replies
-
Also I'm thinking to develop a tool to extract the localization resources automatically from the Oqtane source and find away to run this tool on every commit, so any changes happen the resx will be updates, this of course will make the process easier FYI I already did simalar tool for SimplCommerce also did some contribution for Orchard Core Extractor tool |
Beta Was this translation helpful? Give feedback.
-
This will be difficult to maintain, a better solution would be 1 resx file per language (for example syncfusion does so). An extractor tool and an English source resx would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
I am trying to understand the flexibility / technical limitations of the Localization solution... In the diagram below on the left it describes the flexibility which developers have in organizing their Oqtane projects... you can choose to have an assembly per module, or you can include multiple modules in the same assembly - it depends on how granular you want to be with your deployments. On the right side I am identifying some different configurations for satellite assemblies which provide localized resources to the modules/assemblies on the left. Are all of these options valid? |
Beta Was this translation helpful? Give feedback.
-
I am not sure if you understand my diagram. Assembly1 contains 1 module. Assembly2 contains 3 modules. Neither of these assemblies contain any localization resources. So my question was related to creating the satellite assemblies which contain the localization resources for these modules. The boxes on the right describe a bunch of different scenarios and I was curious which are supported. Based on your answer, it sounds like individual satellite assemblies must be created for each unique language and module combination? So for Assembly2 which contains 3 modules - if I wanted to support French and English then I would need to created 6 satellite assemblies? |
Beta Was this translation helpful? Give feedback.
-
I understand what you mean, but how the satallite assemblies will be created for the modules inside Assembly1 and Assembly2?!!
This is correct if you want to localize all the modules |
Beta Was this translation helpful? Give feedback.
-
So this diagram is the expected approach? |
Beta Was this translation helpful? Give feedback.
-
I think there's miss understood here Components No. Per Module = Resx files required for that module. as example If we have 20 modules and each one has 4 razor components, that means you require to have 20 * 4 = 80 RESX files, but at the end there will be a single satellite file Hope it's clear now and sorry for missunderstod at the beginning |
Beta Was this translation helpful? Give feedback.
-
Its complicated to describe - which is why I created a diagram to visualize it. So just to clarify once again to ensure it is 100% clear, the diagram below shows that if you want to localize to French an assembly which contains 3 modules, you can create either individual satellite assemblies for each module OR you can create a single satellite assembly which contains the resources for all 3 modules. Oqtane will be able to handle both scenarios in terms of localizing the resources for the 3 modules into French. Correct? |
Beta Was this translation helpful? Give feedback.
-
FYI I added the default resources (English), I will start to localize another language to make sure that nothing breaks, you could start to localize your favorite language too |
Beta Was this translation helpful? Give feedback.
-
@sbwalker I finished to document all the required steps needs for the translations, BTW can I blog on |
Beta Was this translation helpful? Give feedback.
-
@hishamco thank you for creating some initial instructions. I have a number of questions.... Note that the overarching theme for everything in Oqtane is that integrations with the framework should be as simple as possible and require minimal manual effort. And to ensure a seamless upgrade path, integrations should be cleanly separated from the framework and should interact with the framework via supported extensions points. The instructions seem to indicate that the RESX files need to be manually copied by the user into a specific folder structure within the framework ( which is not clearly described using a screen shot ) and all of the files need to be manually renamed. It does not say anything about having to compile the RESX files... or the Oqtane framework itself... so I guess one would have to assume that at runtime the RESX files are automatically processed. This process appears to be complicated and manual. And if it is true that no compilation is required then I am sure we can create a better approach for how to organize the files in the repo so that they can be overlaid over the framework with much less manual effort. That being said, I raised questions earlier in this thread about the compilation and deployment of resources. I was expecting that it would be possible to compile RESX files into a satellite assembly - and that satellite assembly could then be deployed to the /bin in a single step to localize the environment. This is the approach which modules and themes utilize currently - the run-time deployment model is fundamental to the Oqtane development experience. So my question is whether or not this is possible with the current solution. And if it is possible ( which I assume it is based on your answers to my questions above ) then we need detailed instructions which enable translators to create satellite assemblies. As a separate use case we also need instructions on how a developer would localize an external module - which was the primary use case for the localization solution. |
Beta Was this translation helpful? Give feedback.
-
@sbwalker I will write a detailed answer later, regarding the renaming is necessary in case that OS default culture is different of that culture you need to support We may simply the process by agree with certain supported languages, then I can automate the process so the translators will focus on the translation process only This also may improved by publishing a NuGet packages and modify Oqtane project tasks to copy the translations in the right place I think we need to think from many perspectives: Developer and Translator |
Beta Was this translation helpful? Give feedback.
-
Yes there are a number of different user personas who will need instructions that are applicable to their use case. The main thing I would like to confirm is that it is possible to compile RESX files into resources DLLs, and that these DLLs can be deployed independently into the Oqtane /bin and will be available ( as long as those cultures were manually added to the appsettings.json as well )? |
Beta Was this translation helpful? Give feedback.
-
I think so, but this need to compile RESX files before, this way the .resources.dll need to be added to final app IMHO we can make this repo as source of the localization resource then provide a better and easy way to deploy these resources |
Beta Was this translation helpful? Give feedback.
-
I agree that this repo should be the place where framework resources are maintained. However those framework resources are not useful unless there are clear instructions on how to integrate them. If you look at the original post in oqtane/oqtane.framework#749 you will see: As per the Oqtane philosophy, the solution should leverage standard Microsoft approaches as much as possible. It should also leverage encapsulation in terms of minimizing the number of individual assets which need to be deployed. And to ensure a consistent development experience, static localization should follow the same pattern for the core framework as it does for external modules. |
Beta Was this translation helpful? Give feedback.
-
Here is a use case to consider.... I am a developer using Oqtane. I use it as a framework - so I do not have the Oqtane source code in my development environment. I develop external modules, themes, etc... to create my custom application. Now I would like to support a different language in my application ie. French. How would I integrate only the French resources into my application for the specific version of Oqtane I am utilizing? One possible answer is that I go to the Translations repo and I clone the resources. I find the location where the French framework resources are stored which are specific to my framework version. I compile those resources into satellite assemblies. I deploy those satellite assemblies to the /bin in my application. I add the culture to appsettings.json. Finished. |
Beta Was this translation helpful? Give feedback.
-
Agreed, but this is how RESX works, the remaining is essential because the default culture is only provided in this repo, once other languages started the process will become easier. One more thing it could simply the process is the tool can handle generate appropriate naming and copying for generated resources, this way one command from within the CLI will handle this I can start a new branch in |
Beta Was this translation helpful? Give feedback.
-
Before adding any automation via the Extractor tool can we please get the manual process established and working first? |
Beta Was this translation helpful? Give feedback.
-
Are you saying that satellite assemblies cannot be created and deployed independently to Oqtane? I believe other products in the .NET ecosystem provide support for this. |
Beta Was this translation helpful? Give feedback.
-
Can we accelerate the process by chatting via Gitter if you don't mind |
Beta Was this translation helpful? Give feedback.
-
Welcome to oqtane.translations repo, this repo should have the supported cultures by Oqtane Framework, few notes I'd like to share with you:
The cultures are driven by the Oqtane community, so commitment to support all the cultures, but we could ship the cultures with >= 80% completed as NuGet packages if @sbwalker agree
We could provide a resx template, so contributors can easily start work with them and complete thier translations
/cc @sbwalker @chlupac
Beta Was this translation helpful? Give feedback.
All reactions