Intro

Herewith some notes from the original video.
Please watch Pallavi’s video if you need more help.
25th July 2024

Languaging (Repo) - Clone

Create a new language set

In the folder:
MiXFleetManager > mixfleet_configui (new folder) //Folder created
Then create this folder:
Templates (new)
Create this file:
.pot

Typically you will have a string combination like this which will get translated in .po files

msgid "STRING TO LANGUAGE"
msgstr ""

There is also a folder:
LinqPad Scripts
Open the following file:
CreateInitialLanguageFolders.linq
change:
string newTranslationComponent = “mixfleet_configui”; //Folder created

Open this in LinqPad 5
run
(this creates all the language folders)

Check all this into master

BE Deploy needed to deploy languaging

Amazon S3

  • Our language strings lives here
  • Need to create a login
  • AWS Login for SDK access
    • It will make use of Chocolatey
    • You will need this twice a day: saml2aws login -a default
    • The SAML setup will create a file inside …\users\USERNAME\.saml2aws
    • On OKTA App you will also need to verify

Frangular API Swagger (test lanuage strings)

Breakpoint in Frangular API

Translations

Not our issue, external people do this.
We just check PigLatin

Frangular API: CultureModule

Needs the hypermedia for “getHypermedia”

OLD UI

Pass into the controller, the LanguageService.Servicename
(This forms part of the angular module)
Translationservice is then sent to the FR UI via the translationService value

Frangular UI

app.component.ts

Ensure you have the correct languaging service code in:

  • ngOnInit
  • moduleService.getModule… culture…
    It also needs to be in the modulelist
 this.languageService.languageSet.onLanguageSetChanged
  .pipe(takeWhile(() => this.alive))
  .subscribe(() => {
	if (this.authTokenSet) {
	  this.languageStringsSet = true;
	}
  });

mix-modules.ts

Component you work on (eg. video-event-configuration)

Calling the translate service to translate the above text

The HTML side of this

Inside the contructor

Hide HTML if no languageset

Building

You can only run the pipeline after 8am as the build server is not up before then

  • Build Languaging
  • Build BE

Testing locally

In FR UI, change this line:
export const APIURL_DEV = “http://localhost:5000”;
to:
export const APIURL_DEV = “https://mixconfigfrangularapi.mixdevelopment.com”;

PRs

Pull request 106849: STM-1074: Setup for languaging angular application - Repos (azure.com)