Fix german title not being shortened

This commit is contained in:
Ajay 2024-01-16 18:37:37 -05:00
parent 2bf6cf663b
commit 5c30b985a0

View file

@ -160,7 +160,7 @@ module.exports = env => {
if (path.match(/(\/|\\)_locales(\/|\\).+/)) {
const parsed = JSON.parse(content.toString());
if (env.browser.toLowerCase() === "safari") {
parsed.fullName.message = parsed.fullName.message.match(/^.+(?= -)/)?.[0] || parsed.fullName.message;
parsed.fullName.message = parsed.fullName.message.match(/^.+(?= [-])/)?.[0] || parsed.fullName.message;
if (parsed.fullName.message.length > 50) {
parsed.fullName.message = parsed.fullName.message.slice(0, 47) + "...";
}