Cypress V10 + Cucumber localization technique - How do I run the same scripts in multiple languages - localization

I want to run my feature files in multiple languages by only changing the Locale as English or French or any other language.
I have created separate json files for both English (en-us.json) and French (fr-fr.json).
If I give the "Locale" as "English" in feature file, en-us.json file should be picked up and if I change the "Locale" as "French", fr-fr.json file should be picked up for assertions.
Please guide me how to do.
I am using Cypress v10 + Cucumber
Currently my scripts are running fine in English.
Need to implement for Localization testing

Related

Using fastlane, how can I route one set of localized screenshots to two different app stores

For example, my app supports French and I would like to use my French screenshots in both the French (fr-FR) app store, but also in the French Canadian (fr-CA) app store as well.
In the interest of time, I'd like to only run one of these during my screenshot creation phase, so I only have fr-FR under my languages option in my snapfile.
Therefor, is it possible to route the screenshots under fr-FR to fr-CA as well within iTunes Connect when running fastlane?
Looking through the upload_to_app_store documentation, I have not found anything that appears to address this.
I added a shell file that runs a copy script to create a new folder and copy the contents from French into the fr-CA folder.

handle translation of website

I finished my website and want to translate it in 3 other languages.
The question is not how to translate it, but how to handle the different languages, when you don't use a CMS.
I have all my script with English text in it.
I'm able to translate it in Dutch, French and German, so I'll have 3 folders: 1 folder for each language.
The problem is when I wan't to upgrade the website:
If I change code from the English folder, I'd like to juste copy-and-paste this code for the 3 other languages.
Problem is that I will always have to retranslate it to 3 other languages again.
How do big websites handle translation?
Having multiple folders, with every folder = 1 language, is the way to proceed?
Text coming from database is a better solution? With a table for each language?
Make a function with the parameters: string code, language
So for example:
translate('error_1','de_DE');
that "would" return an specified error in German.
So you could create 3 .csv files with all the strings you would need.
And having multiple folders is rubbish.
On the bis pages it just seems as they use different folders but the "folder" is handled via. .htaccess and is changed to i.e. index.php?page=main&language=de_DE

Create localized .zip file to be uploaded on Blackberry app world

I need to create .zip file to be uploaded on Blackberry (App) World, but the instructions on the Blackberry page seem to be very confusing.
I have 3 bundles, support for OS version 4.6, support for OS version 4.7 and up, support for 6.0 and up. I need to support two languages (English and Spanish).
To do that do I need to create 2 bundles for each OS version? One for English and one for Spanish? Do I also need to add a suffix on each .cod file per bundle to support the languages that I need to support?
...do I need to create 2 bundles for each os version?
It depends how you want to do it.
Single-Language Bundles
If the English and Spanish versions have large differences, then you might find yourself using different images, possibly even different UI layouts, in addition to simply changing the language of your text. In that situation, you might want to provide a different bundle for each language (so you would have 3 English bundles and 3 Spanish bundles). That file structure might look like this:
- MyApp_2.0
- release.xml
- MyAppNoTouchEnglish_4.6.0.0
- devices.txt
- <.cod files go here>
+ MyAppNoTouchSpanish_4.6.0.0
+ MyAppTouchEnglish_4.7.0.0
+ MyAppTouchSpanish_4.7.0.0
+ MyAppTouchEnglish_6.0.0.0
+ MyAppTouchSpanish_6.0.0.0
Then, in the top-level release.xml file, you would need to identify the language codes of your bundles:
<?xml version="1.0" encoding="utf-8"?>
<Release version="x.x.x.x">
<ReleaseNotes>Release note text</ReleaseNotes>
<filebundle name="MyAppNoTouchEnglish_4.6.0.0">
<language>en</language>
</filebundle>
<filebundle name="MyAppNoTouchSpanish_4.6.0.0">
<language>es</language>
</filebundle>
<filebundle name="MyAppTouchEnglish_4.7.0.0">
<language>en</language>
</filebundle>
<filebundle name="MyAppTouchSpanish_4.7.0.0">
<language>es</language>
</filebundle>
<filebundle name="MyAppTouchEnglish_6.0.0.0">
<language>en</language>
</filebundle>
<filebundle name="MyAppTouchSpanish_6.0.0.0">
<language>es</language>
</filebundle>
</Release>
Multi-Language Bundles
However, if there are not major differences between your app versions (English/Spanish), and you just want to let your code display text in the user's supported language, I would recommend using the BlackBerry localization APIs. These would allow one bundle to support both English and Spanish. That way, you'd only need 3 bundles (MyAppNoTouch_4.6.0.0, MyAppTouch_4.7.0.0, and MyAppTouch_6.0.0.0). Here is a tutorial on this technique.
If you do it this way, if I remember correctly, you simply don't include the <language></language> elements in release.xml, since each bundle supports both languages.
Do I also need to add a suffix on each .cod file per bundle to support the languages that I need to support?
No, you don't have to, but that would actually be yet another way to handle this. You can let one "Bundle" support English and Spanish. Then, within that bundle, you can have different .cod files, which individually support English or Spanish:
- MyApp_2.0
- MyAppNoTouch_4.6.0.0
- MyApp_en.cod
- MyApp_es.cod
- MyApp-1_en.cod
- MyApp-1_es.cod
- MyApp-2_en.cod
- MyApp-2_es.cod
I haven't used this technique, personally. It's just another way to achieve localization, but you don't have to do it this way.
More
Also, see here for some advice on localizing BB apps.

TYPO3 alternative page language configuration

I'm trying to join a bunch of pages that are in different languages to a single page whith multiple alternative page languages.
This way, instead of having 3 Home pages, each one with its own language, I have 1 with several alternative page languages. So I'll have one page but the content is in different languages, depending on the language record it uses.
The issue is that TYPO3 extensions should behave differently depending on the language, i.e: form fields should be translated.
For that I was thinking on having a local storage folder for each page language record in order to hold the extension configurations. Chinese language would have a separated storage folder from the english version and the extension running for the chinese version would use the correct storage folder.
But how can I specify which storage folder the extension in the chinese language record should use if I don't use a new page?
Because if I use a language record to differentiate chinese from english I can't have different typoscript configurations. The language record properties page doesn't have a ts config field and as such I can't tell that the extension should use a different storage folder (different pid) for this language.
For each language you can add a cObj plugin and thus edit the plugin configuration. You can also use a condition and getText to assign a new pid to the plugin. For example plugin.test_pi1.sysfolder < 666.
The first option is when you look in the mysql table language overlay you have a separate record ctype plugin of your plugin and thus you can edit the plugin configuration.

How to translate Virtue Mart 2.0 (Joomla e-comerce plugin)?

I'm using Virtue Mart on joomla for catalogue features.And as I'm using joomla 1.7, I'm forced to use VirtueMart 2.0 that's still in RC state. I need to translate it to Ukrainian language because it's so new, that nobody have done it already.
Does anybody know where I should start? Because I've spent a lot of time looking for something like: "VirtueMart 2.0 translation guide" but I had no luck.
Uh… I've figured it out already. Her's what you should do:
Get the english files called en-GB.com_virtuemart.ini from /language/en-GB and /administrator/language/en-GB. First is for front-end "what the visitors see" and the second is for the back-end "admin panel".
Edit the file in any text editor. Just replace the words in quotes with what you need.
Change the beginning of the file to your language key and put it in the corresponding language directory in /language and /administrator/language. As for Ukrainian, the files will be renamed to uk-UA.com_virtuemart.ini and put in /language/uk-UA and /administrator/language/uk-UA.
I can also suggest using some version control to support translation, so you will see, what have you replaced with what.
If you want to make a package that could be installed with extension manager, you should read Creating language packs for extensions in Joomla_1.6

Resources