Skip to content

Commit

Permalink
Fixing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Oct 12, 2022
1 parent af66e69 commit 7d79b34
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 16 deletions.
20 changes: 13 additions & 7 deletions front/src/Components/Login/LoginScene.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logoImg from "../images/logo.png";
import poweredByWorkAdventureImg from "../images/Powered_By_WorkAdventure_Big.png";
import { gameManager } from "../../Phaser/Game/GameManager";
import LL, {locale} from "../../i18n/i18n-svelte";
import LL, { locale } from "../../i18n/i18n-svelte";
import { NameNotValidError, NameTooLongError } from "../../Exception/NameError";
export let game: Game;
Expand All @@ -21,23 +21,29 @@
let legalStrings: string[] = [];
if (legals?.termsOfUseUrl) {
legalStrings.push("<a href=\""+encodeURI(legals.termsOfUseUrl)+"\" target=\"_blank\">" + $LL.login.termsOfUse() + "</a>");
legalStrings.push(
'<a href="' + encodeURI(legals.termsOfUseUrl) + '" target="_blank">' + $LL.login.termsOfUse() + "</a>"
);
}
if (legals?.privacyPolicyUrl) {
legalStrings.push("<a href=\""+encodeURI(legals.privacyPolicyUrl)+"\" target=\"_blank\">" + $LL.login.privacyPolicy() + "</a>");
legalStrings.push(
'<a href="' + encodeURI(legals.privacyPolicyUrl) + '" target="_blank">' + $LL.login.privacyPolicy() + "</a>"
);
}
if (legals?.cookiePolicyUrl) {
legalStrings.push("<a href=\""+encodeURI(legals.cookiePolicyUrl)+"\" target=\"_blank\">" + $LL.login.cookiePolicy() + "</a>");
legalStrings.push(
'<a href="' + encodeURI(legals.cookiePolicyUrl) + '" target="_blank">' + $LL.login.cookiePolicy() + "</a>"
);
}
let legalString: string | undefined;
if (legalStrings.length > 0) {
if (Intl.ListFormat) {
const formatter = new Intl.ListFormat(locale, { style: 'long', type: 'conjunction' });
const formatter = new Intl.ListFormat(locale as unknown as string, { style: "long", type: "conjunction" });
legalString = formatter.format(legalStrings);
} else {
// For old browsers
legalString = legalStrings.join(', ');
legalString = legalStrings.join(", ");
}
}
Expand Down Expand Up @@ -94,7 +100,7 @@
<a style="display: none;" href="translation">Needed for translation CSS</a>
<p>
{@html $LL.login.terms({
links: legalString
links: legalString,
})}
</p>
</section>
Expand Down
6 changes: 4 additions & 2 deletions front/src/Connexion/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CONTACT_URL, PUSHER_URL, DISABLE_ANONYMOUS } from "../Enum/EnvironmentV
import { localUserStore } from "./LocalUserStore";
import axios from "axios";
import { axiosWithRetry } from "./AxiosUtils";
import {isMapDetailsData, LegalsData, MapDetailsData} from "../Messages/JsonMessages/MapDetailsData";
import { isMapDetailsData, LegalsData, MapDetailsData } from "../Messages/JsonMessages/MapDetailsData";
import { isRoomRedirect } from "../Messages/JsonMessages/RoomRedirect";
import { MucRoomDefinitionInterface } from "../Messages/JsonMessages/MucRoomDefinitionInterface";

Expand Down Expand Up @@ -106,7 +106,9 @@ export class Room {
const data = result.data;

if ((data as MapDetailsData).authenticationMandatory !== undefined) {
(data as MapDetailsData).authenticationMandatory = Boolean((data as MapDetailsData).authenticationMandatory);
(data as MapDetailsData).authenticationMandatory = Boolean(
(data as MapDetailsData).authenticationMandatory
);
}

const roomRedirectChecking = isRoomRedirect.safeParse(data);
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/de-DE/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const login: DeepPartial<Translation["login"]> = {
notValidError: "Der Name ist ungültig",
},
},
terms: 'Wenn du fortfährst, akzeptierst du die {links}.',
terms: "Wenn du fortfährst, akzeptierst du die {links}.",
termsOfUse: "Nutzungsbedingungen",
privacyPolicy: "Datenschutzerklärung",
cookiePolicy: "Cookierichtlinien",
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/en-US/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const login: BaseTranslation = {
notValidError: "Incorrect name format",
},
},
terms: 'By continuing, you are agreeing our {links}.',
terms: "By continuing, you are agreeing our {links}.",
termsOfUse: "terms of use",
privacyPolicy: "privacy policy",
cookiePolicy: "cookie policy",
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/es-ES/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const login: DeepPartial<Translation["login"]> = {
notValidError: "El nombre no es válido",
},
},
terms: 'Si continúa, está de acuerdo con nuestros {links}.',
terms: "Si continúa, está de acuerdo con nuestros {links}.",
termsOfUse: "términos de uso",
privacyPolicy: "política de privacidad",
cookiePolicy: "política de cookie",
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/fr-FR/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const login: DeepPartial<Translation["login"]> = {
notValidError: "Le nom n'est pas valide",
},
},
terms: 'En continuant, vous acceptez nos {links}.',
terms: "En continuant, vous acceptez nos {links}.",
termsOfUse: "nos conditions d'utilisation",
privacyPolicy: "notre politique de confidentialité",
cookiePolicy: "notre politique relative aux cookies",
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/pt-BR/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const login: DeepPartial<Translation["login"]> = {
notValidError: "O nome não é válido",
},
},
terms: 'Ao continuar, você concorda com nossos {links}.',
terms: "Ao continuar, você concorda com nossos {links}.",
termsOfUse: "termos de uso",
privacyPolicy: "política de privacidade",
cookiePolicy: "política de cookies",
Expand Down
2 changes: 1 addition & 1 deletion front/src/i18n/zh-CN/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const login: DeepPartial<Translation["login"]> = {
empty: "名字为空",
},
},
terms: '点击继续,意味着你同意我们的{links}.',
terms: "点击继续,意味着你同意我们的{links}.",
termsOfUse: "使用协议",
privacyPolicy: "隐私政策",
cookiePolicy: "Cookie策略",
Expand Down
2 changes: 1 addition & 1 deletion messages/JsonMessages/MapDetailsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const isMapDetailsData = z.object({
description: "Configuration of the 'Customize your Woka' scene (WIP)",
}),
backgroundColor: extendApi(z.string().nullable().optional(), {
description: 'The background color used on configuration scenes (enter your name, select a woka, etc...) (WIP)',
description: "The background color used on configuration scenes (enter your name, select a woka, etc...) (WIP)",
example: "#330033",
}),
});
Expand Down

0 comments on commit 7d79b34

Please sign in to comment.