Skip to content

Commit

Permalink
v13.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Aug 6, 2024
1 parent 1face24 commit 0a81614
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/esm/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Gleap.identify("user1234", {
sla: 30,
});

Gleap.initialize("xwjGqF5QHMTuQauPoZyMzarGqg7WyTvN");
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "13.8.7",
"version": "13.9.0",
"main": "build/cjs/index.js",
"module": "build/esm/index.mjs",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions published/13.9.0/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions src/GleapTranslationManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { GleapFrameManager, GleapFeedbackButtonManager, GleapSession, GleapConfigManager } from "./Gleap";
import {
GleapFrameManager,
GleapFeedbackButtonManager,
GleapSession,
GleapConfigManager,
} from "./Gleap";

export default class GleapTranslationManager {
overrideLanguage = "";
Expand All @@ -23,7 +28,7 @@ export default class GleapTranslationManager {

/**
* Sets the language to override the default language.
* @param {*} language
* @param {*} language
*/
setOverrideLanguage(language) {
this.overrideLanguage = language;
Expand All @@ -34,18 +39,22 @@ export default class GleapTranslationManager {
const flowConfig = GleapConfigManager.getInstance().getFlowConfig();

this.isRTLLayout = false;
if (flowConfig && flowConfig.localizationOptions && flowConfig.localizationOptions.rtl) {
if (
flowConfig &&
flowConfig.localizationOptions &&
flowConfig.localizationOptions.rtl
) {
this.isRTLLayout = true;
}

GleapFeedbackButtonManager.getInstance().updateFeedbackButtonState();
GleapFrameManager.getInstance().updateFrameStyle();
}

getActiveLanguage() {
var language = "en";
if (typeof navigator !== "undefined") {
language = navigator.language.substring(0, 2).toLowerCase();
language = navigator.language.toLowerCase();
}
if (this.overrideLanguage && this.overrideLanguage !== "") {
language = this.overrideLanguage.toLowerCase();
Expand Down

0 comments on commit 0a81614

Please sign in to comment.