Skip to content

Commit

Permalink
Merge pull request #822 from adobe/release-20240924
Browse files Browse the repository at this point in the history
chore(release): 2024-09-24
  • Loading branch information
rofe authored Sep 24, 2024
2 parents abf39ae + 135cb50 commit 2bae6a2
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/extension/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
"message": "Zugriff abgelaufen. Melden Sie sich erneut an, um fortzufahren."
},
"error_site_403": {
"message": "Zugriff verweigert. Versuchen Sie, sich mit einem anderen Benutzer anzumelden, oder bitten Sie Ihren Administrator um ausreichende Berechtigungen."
"message": "Zugriff verweigert. Versuchen Sie, sich mit einem anderen Benutzerkonto anzumelden, oder bitten Sie Ihre bzw. Ihren Admin um ausreichende Berechtigungen."
},
"error_status_403": {
"message": "403 Verboten: Bitten Sie Ihre bzw. Ihren Admin um ausreichende Berechtigungen."
Expand Down
4 changes: 2 additions & 2 deletions src/extension/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"message": "Bulk operation failed. Please try again later."
},
"bulk_error_illegal_file_name": {
"message": "Only normalized, small latin letters, digits and hyphens are allowed in file names. The following file name contains illegal characters:"
"message": "Only normalized, small latin letters, digits and hyphens are allowed in file and folder names. The following path contains illegal characters:"
},
"bulk_error_illegal_file_names": {
"message": "Only normalized, small latin letters, digits and hyphens are allowed in file names. The following file names contain illegal characters:"
"message": "Only normalized, small latin letters, digits and hyphens are allowed in file and folder names. The following paths contain illegal characters:"
},
"bulk_error_preview_login_required": {
"message": "You need to sign in to generate the preview of more than 100 files."
Expand Down
8 changes: 4 additions & 4 deletions src/extension/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"message": "URL du contenu : https://..."
},
"config_manual_org_placeholder": {
"description": "Nom de l'organisation tel que dans le service de configuration",
"description": "Nom de lorganisation tel que dans le service de configuration",
"message": "Nom d’organisation"
},
"config_manual_previewHost_placeholder": {
Expand Down Expand Up @@ -402,10 +402,10 @@
"message": "Connectez-vous pour continuer."
},
"error_site_401_relogin": {
"message": "Accès expiré. Veuillez vous reconnecter pour continuer."
"message": "Accès arrivé à expiration. Reconnectez-vous pour continuer."
},
"error_site_403": {
"message": "Accès refusé. Essayez de vous connecter avec un autre utilisateur ou demandez à votre administrateur des autorisations suffisantes."
"message": "Accès refusé. Essayez de vous connecter avec une autre identité ou demandez à votre équipe d’administration des autorisations suffisantes."
},
"error_status_403": {
"message": "403 Accès interdit : demandez les autorisations nécessaires à votre administrateur ou à votre administratrice."
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "Se déconnecter"
},
"user_relogin": {
"message": "Reconnectez-vous"
"message": "Se reconnecter"
},
"user_switch": {
"message": "Changer d'utilisateur"
Expand Down
8 changes: 4 additions & 4 deletions src/extension/_locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@
"message": "Questo è un documento Microsoft Excel. Convertilo in Fogli Google: File > Salva come foglio Google"
},
"error_site_401": {
"message": "Effettua l'accesso per continuare."
"message": "Accedi per continuare."
},
"error_site_401_relogin": {
"message": "Accesso scaduto. Per continuare, effettua di nuovo l'accesso."
"message": "Accesso scaduto. Accedi di nuovo per continuare."
},
"error_site_403": {
"message": "Accesso negato. Prova ad accedere con un altro utente o chiedi all'amministratore le autorizzazioni necessarie."
"message": "Accesso negato. Prova ad accedere con un altro utente o chiedi allamministratore le autorizzazioni necessarie."
},
"error_status_403": {
"message": "403 - Non consentito: chiedi all’amministratore le autorizzazioni necessarie."
Expand Down Expand Up @@ -438,7 +438,7 @@
"message": "Risposta del server non valida. Controlla la configurazione o l’URL di Sidekick."
},
"error_view_description": {
"message": "Messaggio di errore intuitivo."
"message": "Messaggio di errore descrittivo."
},
"extensions": {
"message": "Estensioni"
Expand Down
10 changes: 5 additions & 5 deletions src/extension/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"message": "コンテンツ URL : https://..."
},
"config_manual_org_placeholder": {
"description": "設定サービスに含まれる組織名",
"description": "設定サービスでの組織名",
"message": "組織名"
},
"config_manual_previewHost_placeholder": {
Expand Down Expand Up @@ -399,13 +399,13 @@
"message": "これは、Microsoft Excel ドキュメントです。[ファイル] > [Google スプレッドシートとして保存] を選択し、Google スプレッドシートに変換してください"
},
"error_site_401": {
"message": "続行するにはサインインしてください"
"message": "続行するには、ログインしてください"
},
"error_site_401_relogin": {
"message": "アクセス期限切れ。続行するには、もう一度サインインしてください"
"message": "アクセスの有効期限が切れています。続行するには、もう一度ログインしてください"
},
"error_site_403": {
"message": "アクセスが拒否されました。別のユーザーでサインインするか、管理者に十分な権限を問い合わせてください"
"message": "アクセスが拒否されました。別のユーザーでログインするか、管理者に十分な権限を求めてください"
},
"error_status_403": {
"message": "403 Forbidden:管理者に十分な許可を求めてください。"
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "ログアウト"
},
"user_relogin": {
"message": "もう一度サインイン"
"message": "もう一度ログイン"
},
"user_switch": {
"message": "ユーザーを切り替え"
Expand Down
6 changes: 3 additions & 3 deletions src/extension/_locales/ko/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
"message": "액세스가 만료되었습니다. 계속하려면 다시 로그인하십시오."
},
"error_site_403": {
"message": "액세스가 거부되었습니다. 다른 사용자로 로그인하거나 관리자에게 충분한 권한을 요청하십시오."
"message": "액세스가 거부되었습니다. 다른 사용자로 로그인을 시도하거나 관리자에게 권한을 요청하시기 바랍니다."
},
"error_status_403": {
"message": "403 금지됨: 관리자에게 충분한 권한을 요청하십시오."
Expand Down Expand Up @@ -438,7 +438,7 @@
"message": "잘못된 서버 응답입니다. Sidekick 구성 또는 URL을 확인하십시오."
},
"error_view_description": {
"message": "사용자에게 친숙한 오류 메시지."
"message": "알기 쉬운 오류 메시지."
},
"extensions": {
"message": "확장 기능"
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "로그아웃"
},
"user_relogin": {
"message": "다시 로그인"
"message": "다시 로그인하십시오"
},
"user_switch": {
"message": "사용자 전환"
Expand Down
12 changes: 6 additions & 6 deletions src/extension/_locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"message": "URL do conteúdo inválido"
},
"config_invalid_org_site": {
"message": "Nome de organização ou site inválido"
"message": "Nome da organização ou site inválido"
},
"config_invalid_shareurl": {
"message": "URL de compartilhamento inválido"
Expand Down Expand Up @@ -399,13 +399,13 @@
"message": "Este é um documento do Microsoft Excel. Converta-o para Planilhas Google: Arquivo > Salvar como Planilhas Google"
},
"error_site_401": {
"message": "Entre para continuar."
"message": "Faça logon para continuar."
},
"error_site_401_relogin": {
"message": "Acesso expirado. Entre novamente para continuar."
"message": "Acesso expirado. Faça logon novamente para continuar."
},
"error_site_403": {
"message": "Acesso negado. Tente entrar com um usuário diferente ou peça permissões suficientes ao administrador."
"message": "Acesso negado. Tente fazer logon com um usuário diferente ou peça permissões suficientes à administração."
},
"error_status_403": {
"message": "403 Proibido: Solicite ao administrador as permissões necessárias."
Expand Down Expand Up @@ -438,7 +438,7 @@
"message": "Resposta do servidor inválida. Verifique sua configuração Sidekick ou o URL."
},
"error_view_description": {
"message": "Mensagem de erro amigável."
"message": "Mensagem de erro intuitiva."
},
"extensions": {
"message": "Extensões"
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "Fazer logoff"
},
"user_relogin": {
"message": "Entrar novamente"
"message": "Fazer logon novamente"
},
"user_switch": {
"message": "Trocar usuário"
Expand Down
8 changes: 4 additions & 4 deletions src/extension/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@
"message": "请登录以继续。"
},
"error_site_401_relogin": {
"message": "访问已过期。请重新登录以继续。"
"message": "访问过期。请重新登录以继续。"
},
"error_site_403": {
"message": "访问被拒绝。请尝试使用其他用户登录,或向您的管理员请求足够的权限"
"message": "访问被拒。请尝试以其他用户身份登录或向管理员申请足够的权限"
},
"error_status_403": {
"message": "403 禁止:请向管理员请求足够的权限。"
Expand Down Expand Up @@ -438,7 +438,7 @@
"message": "服务器响应无效。检查您的 Sidekick 配置或 URL。"
},
"error_view_description": {
"message": "用户友好的错误消息"
"message": "用户友好型错误消息"
},
"extensions": {
"message": "扩展"
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "注销"
},
"user_relogin": {
"message": "再次登录"
"message": "重新登录"
},
"user_switch": {
"message": "切换用户"
Expand Down
8 changes: 4 additions & 4 deletions src/extension/_locales/zh_TW/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@
"message": "請登入以繼續。"
},
"error_site_401_relogin": {
"message": "存取已過期。請再次登入以繼續"
"message": "存取已到期。請重新登入以繼續"
},
"error_site_403": {
"message": "存取被拒絕。請嘗試使用其他使用者登入,或要求您的管理員提供足夠許可權"
"message": "存取已遭拒。請嘗試使用不同的使用者登入,或向管理員要求足夠的權限"
},
"error_status_403": {
"message": "403 已禁止:請向管理員要求足夠的權限。"
Expand Down Expand Up @@ -438,7 +438,7 @@
"message": "伺服器回應無效。請檢查您的 Sidekick 設定或 URL。"
},
"error_view_description": {
"message": "方便使用的錯誤訊息"
"message": "使用者友好的錯誤訊息"
},
"extensions": {
"message": "擴充功能"
Expand Down Expand Up @@ -625,7 +625,7 @@
"message": "登出"
},
"user_relogin": {
"message": "重新登入"
"message": "再次登入"
},
"user_switch": {
"message": "切換使用者"
Expand Down
40 changes: 29 additions & 11 deletions src/extension/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,21 @@ import sampleRUM from './rum.js';
text: i18n(sk, 'preview'),
action: async () => {
const { status, location } = sk;
if (status.edit.illegalPath) {
sk.showModal(
[
i18n(sk, 'bulk_error_illegal_file_name'),
status.edit.illegalPath,
createTag({
tag: 'button',
text: i18n(sk, 'close'),
}),
],
true,
2,
);
return;
}
if (status.edit && status.edit.sourceLocation
&& status.edit.sourceLocation.startsWith('onedrive:')
&& !location.pathname.startsWith('/:x:/')) {
Expand Down Expand Up @@ -1692,7 +1707,7 @@ import sampleRUM from './rum.js';
// omit docx extension on sharepoint
ext = '';
}
if (type === 'xlsx' || type === 'spreadsheet') {
if (type === 'xlsx' || (type === 'spreadsheet' && ext !== '.xlsx')) {
// use json extension for spreadsheets
ext = '.json';
}
Expand All @@ -1709,10 +1724,13 @@ import sampleRUM from './rum.js';
return `${folder}${folder.endsWith('/') ? '' : '/'}${file}${ext}`;
};

const validateWebPaths = (paths) => {
const illegal = paths
.filter((path) => path.startsWith('!ILLEGAL!_'))
.map((path) => path.substring(10));
const validateWebPaths = (status, paths) => {
const { webPath: folder, edit } = status;
const illegal = edit.illegalPath
? [edit.illegalPath] // illegal parent path
: paths
.filter((path) => path.startsWith('!ILLEGAL!_'))
.map((path) => `${folder}${folder.endsWith('/') ? '' : '/'}${path.substring(10)}`);
if (illegal.length > 0) {
sk.showModal({
message: [
Expand Down Expand Up @@ -1744,7 +1762,7 @@ import sampleRUM from './rum.js';
.map((row) => {
const info = row.getAttribute('aria-label') || row.querySelector('span')?.textContent;
// info format: bla.docx, docx File, Private, Modified 8/28/2023, edited by Jane, 1 KB
const type = info.match(/, ([a-z0-9]+) [A-Za-z]+,/)?.[1];
const type = info.match(/, ([\p{L}\p{N}]+) [\p{L}\p{N}]+,/u)?.[1];
const path = type && info.split(`, ${type}`)[0];
return {
path,
Expand All @@ -1770,7 +1788,7 @@ import sampleRUM from './rum.js';
// use path in icon svg to determine type
const typeHint = (row.querySelector(':scope div[role="gridcell"] > div:nth-child(1) path:nth-child(1)') // list layout
|| row.querySelector(':scope div[role="gridcell"] > div:nth-of-type(1) > div:nth-child(2) path:nth-child(1)')) // grid layout
.getAttribute('d').slice(-4);
?.getAttribute('d').slice(-4);
let type = 'unknown';
if (typeHint) {
if (typeHint === folderId || typeHint === sharedFolderId) {
Expand Down Expand Up @@ -1962,7 +1980,7 @@ import sampleRUM from './rum.js';
host,
}) => {
const { config, status } = sk;
const paths = validateWebPaths(bulkSelection
const paths = validateWebPaths(status, bulkSelection
.map((item) => toWebPath(status.webPath, item)));
if (paths.length === 0) {
return;
Expand Down Expand Up @@ -2094,7 +2112,7 @@ import sampleRUM from './rum.js';

const doBulkCopyUrls = async (hostProperty) => {
const { config, status } = sk;
const paths = validateWebPaths(bulkSelection
const paths = validateWebPaths(status, bulkSelection
.map((item) => toWebPath(status.webPath, item)));
if (paths.length === 0) {
return;
Expand Down Expand Up @@ -2147,7 +2165,7 @@ import sampleRUM from './rum.js';
host: sk.config.innerHost,
});
fireEvent(sk, 'previewed', {
paths: validateWebPaths(bulkSelection
paths: validateWebPaths(status, bulkSelection
.map((item) => toWebPath(status.webPath, item))),
});
sampleRUM('sidekick:bulk:previewed');
Expand Down Expand Up @@ -2181,7 +2199,7 @@ import sampleRUM from './rum.js';
host: sk.config.host || sk.config.outerHost,
});
fireEvent(sk, 'published', {
paths: validateWebPaths(bulkSelection
paths: validateWebPaths(status, bulkSelection
.map((item) => toWebPath(status.webPath, item))),
});
sampleRUM('sidekick:bulk:published');
Expand Down
Loading

0 comments on commit 2bae6a2

Please sign in to comment.