Localization Translations Suggestion
I was talking with @fhebel on Gitter to make the translations better in SimplCommerce, so here are few ideas I'd like to share and your feedback are welcome
The problem are:
-
we realize that the translations isn't synchronous with the database entries
-
Many PRs are made to fix a little translations issues or missing once
with that I'm suggesting the following:
-
Create a .NET CLI Core tool to extract the localization strings or
-
Create another repo named
SimplCommerce.Transaltionsthat manage the translation part or may be -
Create a translation service
transalte.simplcommerce.com
The 2 & 3 point needs to consult @thiennn because he has the ownership for the repo
IMHO the tool is very useful to extract the localization strings, then either we can use it from an online service or generate SQL scripts that we need to run later
/cc @fhebel @thiennn
- It's great, but I am not sure we can extract the localization string via CLI 2 & 3 Could you please explain more. Or some mock-up would be really helpful
Thanks
-
We need to build a tool for doing this
-
Creating another repo that separate the translations from the actual source, then we can update SQL scripts periodically or find some way for doing auto commit via bot into the actual SimplCommerce repo
-
Create a web-based service that allow the contributors to edit the translations for SimplCommerce
FYI both options 2 or 3 may need that tool to know the default localization strings (es-US)
I can work on the tool, but regarding the translations repo or the service I need your opinion, because it requires to create another repo named SimplCommerce.Transaltions or new sub domain http://www.translations.simplcommerce.com
We do have a UI for admin to update translation https://demo.simplcommerce.com/admin#!/localization
I knew, but this should will let everyone to translate the localization string over again and again .. the proper solution is to provide a service or a repo to let the users fetch the supported translations, the admin UI may useful for some cases such as non support translation other than that me as a user I expect the translation is already there, especially if the translation is supported
I can imagine a switch in SimplCommerce whether to take the translations from that new service or in the old way. In addition it would be nice if it was possible to selectively copy translations from that service to the own database (that resolves the current issue that there are several scripts for translations in different db flavors, which are probably out of sync) ...
As I mentioned before, creating another repo or a service will resolve the issue that @fhebel mentioned above
Repo created https://github.com/simplcommerce/SimplCommerce.Transaltions
Thanks @thiennn. May I ask you to correct the spelling though (Translations instead of Transaltions)?
@thiennn could you please give access to that repo, so I can merge PRs if it's possible, my plan is
-
Creating a .NET Core CLI tool
-
Start pushing a SQL script into the Translations repo
@hishamco maintainer access is given
@thiennn I create a dev branch could you please set it as default, the master branch will be for stable releases that align with SimplCommerce repo
Just a quick question to refresh my memory ;) Is the localization SQL script executed manually or not?
I will start to create the new tool with the following plan:
Step 1: Scan the views of the SimplCommerce.WebHost
Step 2: Scan the code of the SimplCommerce.WebHost
Step 3: Scan the available modules
Assumptions:
- We should unify the naming for the
HtmlLocalizer,StringLocalizerandViewsLocalizerI will go thought the entire source and make sure that everything is consistent
Result:
-
Generate
en-US.sqlbased on the scanned localized strings -
Create a SQL script for all the supported cultures, we should decide which should be supported for the long term because this needs a community involvement
Woohoo seems the extractor tool is promising

I'd like to inform you that the tool discover some localization string issues, and other missing onces
@thiennn @fhebel you could have a try the tool that hosted in https://github.com/hishamco/SqlExtractor
Still looking for better name for it ;) your suggestion