Workaround for the Language app auto update script
Hi @Anton L,
Using the tutorial on the WIki page and under UNA 12, I created another language app called 'English (US)' with the U.S. flag/icon which was basically a clone of the default 'English app. Everything worked fine.
Now that I have updated to UNA 13-B4, I have so many missing language strings in my English (US) app. I definitely need to update it.
But translating UNA (creating a language app) or updating an existing language (creating app auto update script) is just a big hassle. I wonder why you guys made it so difficult. It used to be easy and straight in Dolphin. I love the Polyglot app a lot but you just can't use it to translate an entire website at once.
I am having such a tough time creating an app auto update script for my 'English (US)' app. So, as I am still working on a dev website (no members yet), i think maybe the easiest way would be to delete the actual 'English (US)' app and created a new one from UNA 13-B4, a clone of the default English app, Then I will have an updated 'English (US)' app. Less headaches!
I made few changes in the language string texts but I can still re-apply them to the new 'English (US)' app in Polyglot. From UNA 13-B5 I will make my best effort to create an app auto update script for all my language apps. Less work! What do you think? Any advise?
Here is my main concern:
In my database table 'sys_localization_languages' I have the following:
ID: 1 - English
ID: 2 - Russian
ID: 3 - English (US)
Deleting, creating and reinstalling the 'English (US)' app will auto increase the table ID by 1 making the new language app ID: 4 and jumping the ID: 3. Then I will have a table with IDs like this:
ID: 1 - English
ID: 2 - Russian
ID: 4 - English (US)
How to reset the Auto-Increment of the sys_localization_languages table or to set it to continiue from the existing ID without jumping? Is it safe to reset it? Will it affect/harm the UNA system or any other database table?
In the near future I will install many other language apps and I need all the IDs organized and in a sequence in the database (e.g. ID 1, 2, 3, 4, 5 etc)
Many thanks
-
- · Tajrebatee
- ·
Great question and am very interested in this as well. In one of my sites, there are 5 languages (via an app that I bought, but unfortunately, whoever made it quit any updates) and the table looks like below (IDs are changed and jumping, yet still working well and was able to updated it from A3 till B4 with no problems so far!):
-
- · OneEagle
- ·
Hi @Tajrebatee Thanks a lot for sharing the screenshot.
Yes, it is exactly what I am trying to avoid. @Anton L @Alex T⚜️
-
-
·
Alex T⚜️
- ·
We have documentation on how to create language app - https://una.io/wiki/Creating-new-language-module
and how to create update script for it with updated langs - https://una.io/wiki/Creating-app-auto-update-script
-
·
Alex T⚜️
-
- · OneEagle
- ·
Hi @Alex T⚜️
That wasn't my question. and your answer was very generic. I know all those links. Please would you mind reading my post again? Thank you!
-
-
·
Alex T⚜️
-
·
In reply to OneEagle
- ·
That wasn't my question. and your answer was very generic. I know all those links. Please would you mind reading my post again? Thank you!
Regarding preserving IDs sequences: it isn't good solution in my opinion, however it's still possible to change autoincrement value for the table by executing the following query, considering it doesn't include any existing IDs:
ALTER TABLE `table_name_here` AUTO_INCREMENT = 123;
-
·
Alex T⚜️
-
- · OneEagle
-
·
In reply to Alex T⚜️
- ·
Ok. Thanks. As you say that it isn't a good solution, I will not do it anymore. I will just delete the actual 'English (US)' app and created a new one from UNA 13-B4, a clone of the default English app. It will be easier for me right now. with less hassle.