1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-27 08:31:20 +02:00

Merge branch 'main' into status-property

This commit is contained in:
Harshil Sharma 2023-01-20 07:36:51 +05:30
commit 33e2039dda
7 changed files with 52 additions and 13 deletions

View File

@ -165,7 +165,7 @@
"FilterByText.placeholder": "過濾文字",
"FilterComponent.add-filter": "+ 增加過濾條件",
"FilterComponent.delete": "刪除",
"FindBoardsDialog.IntroText": "查詢板",
"FindBoardsDialog.IntroText": "查詢板",
"FindBoardsDialog.NoResultsFor": "「{searchQuery}」搜尋未果",
"FindBoardsDialog.NoResultsSubtext": "檢查錯字或嘗試其他搜尋.",
"FindBoardsDialog.SubTitle": "輸入已找到面板.使用 <b>UP/DOWN</b>來瀏覽.<b>ENTER</b>來搜尋, <b>ESC</b> 來取消",
@ -313,8 +313,9 @@
"View.NewTemplateDefaultTitle": "沒有標題的模板",
"View.NewTemplateTitle": "沒有標題",
"View.Table": "圖表",
"ViewHeader.add-template": "+ 新範本",
"ViewHeader.add-template": "新範本",
"ViewHeader.delete-template": "刪除",
"ViewHeader.display-by": "依據{property}顯示",
"ViewHeader.edit-template": "編輯",
"ViewHeader.empty-card": "清空卡片",
"ViewHeader.export-board-archive": "匯出版面打包檔",
@ -331,11 +332,14 @@
"ViewHeader.set-default-template": "設為預設",
"ViewHeader.sort": "排序",
"ViewHeader.untitled": "無標題",
"ViewHeader.view-header-menu": "查看標題菜單",
"ViewHeader.view-menu": "查看菜單",
"ViewLimitDialog.Heading": "已達到每個看板觀看限制",
"ViewLimitDialog.PrimaryButton.Title.Admin": "升級",
"ViewLimitDialog.PrimaryButton.Title.RegularUser": "通知管理者",
"ViewLimitDialog.Subtext.Admin": "升級到專業版或企業版,獲得每個看板無限瀏覽、無限卡片,以及更多。",
"ViewLimitDialog.Subtext.Admin.PricingPageLink": "了解更多我們的計畫",
"ViewLimitDialog.Subtext.Admin.PricingPageLink": "了解更多我們的計畫。",
"ViewLimitDialog.Subtext.RegularUser": "通知你的管理員升級到專業版或是企業版,獲得無限使用看板、卡片、更多。",
"ViewLimitDialog.UpgradeImg.AltText": "升級圖片",
"ViewLimitDialog.notifyAdmin.Success": "已經通知管理者",
"ViewTitle.hide-description": "隱藏敘述",
@ -344,14 +348,17 @@
"ViewTitle.remove-icon": "移除圖示",
"ViewTitle.show-description": "顯示敘述",
"ViewTitle.untitled-board": "未命名版面",
"WelcomePage.Description": "看板是一個專案管理工具,可以使用熟悉的圖表幫助我們定義、組織、追蹤和管理跨團隊工作。",
"WelcomePage.Explore.Button": "探索",
"WelcomePage.Heading": "歡迎來到版面",
"WelcomePage.Heading": "歡迎來到看板",
"WelcomePage.NoThanks.Text": "不需要,自己想辦法",
"WelcomePage.StartUsingIt.Text": "開始使用",
"Workspace.editing-board-template": "您正在編輯版面範本。",
"badge.guest": "訪客",
"boardSelector.confirm-link-board": "連結看板與頻道",
"boardSelector.confirm-link-board-button": "是,連結看版",
"boardSelector.confirm-link-board-subtext": "當你將\"{boardName}\"連接到頻道時,該頻道的所有成員(現有的和新的)都可以編輯。並不包含訪客身分。你可以在任何時候從一個頻道上取消看板的連接。",
"boardSelector.confirm-link-board-subtext-with-other-channel": "當你將\"{boardName}\"連接到頻道時,該頻道的所有成員(現有的和新的)都可以編輯。並不包含訪客身分。{lineBreak} 看板目前正連接到另一個頻道。如果选择在這裡連接它,將取消另一個連接。",
"boardSelector.create-a-board": "建立看版",
"boardSelector.link": "連結",
"boardSelector.search-for-boards": "搜尋看板",
@ -369,12 +376,12 @@
"error.board-not-found": "沒有找到看板.",
"error.go-login": "登入",
"error.invalid-read-only-board": "沒有權限進入此看版.登入後才能訪問.",
"error.not-logged-in": "已被登出,請再次登入使用看板",
"error.not-logged-in": "已被登出,請再次登入使用看板",
"error.page.title": "很抱歉,發生了些錯誤",
"error.team-undefined": "不是有效的團隊",
"error.team-undefined": "不是有效的團隊",
"error.unknown": "發生一個錯誤。",
"generic.previous": "上一篇",
"guest-no-board.subtitle": "你尚未有權限進入此看板,請等人把你加入任何看板",
"guest-no-board.subtitle": "你尚未有權限進入此看板,請等人把你加入任何看板",
"guest-no-board.title": "尚未有看版",
"imagePaste.upload-failed": "有些檔案無法上傳.檔案大小達上限",
"limitedCard.title": "影藏卡片",
@ -386,7 +393,8 @@
"notification-box-card-limit-reached.link": "升級到付費版",
"notification-box-card-limit-reached.title": "將看板上{cards}卡片隱藏",
"notification-box-cards-hidden.title": "此行為隱藏了其他卡片",
"notification-box.card-limit-reached.not-admin.text": "要存取已封存的卡片,你可以點擊{contactLink}升級到付費版",
"notification-box.card-limit-reached.not-admin.text": "要存取已封存的卡片,你可以點擊{contactLink}升級到付費版。",
"notification-box.card-limit-reached.text": "已達卡片上限,觀看舊卡片請點{link}",
"person.add-user-to-board": "將{username} 加入看板",
"person.add-user-to-board-confirm-button": "新增看板",
"person.add-user-to-board-permissions": "權限",
@ -396,22 +404,34 @@
"register.signup-title": "註冊您的帳戶",
"rhs-board-non-admin-msg": "你不是看板的管理者",
"rhs-boards.add": "新增",
"rhs-boards.dm": "私人訊息",
"rhs-boards.gm": "群組訊息",
"rhs-boards.header.dm": "此私人訊息",
"rhs-boards.header.gm": "此群組訊息",
"rhs-boards.last-update-at": "最後更新日: {datetime}",
"rhs-boards.link-boards-to-channel": "將看板連接到{channelName}",
"rhs-boards.linked-boards": "連結看板",
"rhs-boards.no-boards-linked-to-channel": "還沒有看板與{channelName}連接",
"rhs-boards.no-boards-linked-to-channel-description": "看板是一個專案管理工具,可以使用熟悉的圖表幫助我們定義、組織、追蹤和管理跨團隊工作。",
"rhs-boards.unlink-board": "未連結看版",
"rhs-boards.unlink-board1": "未連結看版",
"rhs-channel-boards-header.title": "板塊",
"share-board.publish": "發布",
"share-board.share": "分享",
"shareBoard.channels-select-group": "頻道",
"shareBoard.confirm-change-team-role.body": "此看板上所有低於\"{role}\"的人都將<b>被提升到{role}</b>。你確定要改變這個看板最低角色?",
"shareBoard.confirm-change-team-role.confirmBtnText": "改變最小的看板規則",
"shareBoard.confirm-change-team-role.title": "改變最小的看板規則",
"shareBoard.confirm-link-channel": "連接看板到頻道",
"shareBoard.confirm-link-channel-button": "連接頻道",
"shareBoard.confirm-link-channel-button-with-other-channel": "解除連接或連接這",
"shareBoard.confirm-link-channel-subtext": "當你連接頻道到看板,該頻道所有成員(包含新的與現有的)都可以編輯,不包括訪客",
"shareBoard.confirm-link-channel-subtext": "當你連接頻道到看板,該頻道所有成員(包含新的與現有的)都可以編輯,不包括訪客。",
"shareBoard.confirm-link-channel-subtext-with-other-channel": "當你將一個頻道連接到看板時,該頻道的所有成員(現有的和新的)都可以編輯。並不包含訪客身分{lineBreak}看板目前正連接到另一個頻道。如果选择在這裡連接它,將取消另一個連接。",
"shareBoard.confirm-unlink.body": "當你取消頻道與看板連接,所有頻道成員(現在和新的)都將無法失去查看權限,除非單獨獲得許可。",
"shareBoard.confirm-unlink.confirmBtnText": "解除連結頻道",
"shareBoard.confirm-unlink.title": "從看板上取消頻道連接",
"shareBoard.lastAdmin": "看板必須有一位管理者",
"shareBoard.members-select-group": "會員",
"shareBoard.unknown-channel-display-name": "未知管道",
"tutorial_tip.finish_tour": "完成",
"tutorial_tip.got_it": "了解",

View File

@ -1,6 +1,5 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Utils} from './utils'
import {Card} from './blocks/card'
import {IPropertyTemplate, IPropertyOption, BoardGroup} from './blocks/board'
@ -17,7 +16,7 @@ function groupCardsByOptions(cards: Card[], optionIds: string[], groupByProperty
}
groups.push(group)
} else {
Utils.logError(`groupCardsByOptions: Missing option with id: ${optionId}`)
// if optionId not found, its an old (deleted) option that can be ignored
}
} else {
// Empty group

View File

@ -280,6 +280,10 @@ describe('src/cardFilter', () => {
}
test('verify isBefore clause', () => {
const filterClauseIsBeforeEmpty = createFilterClause({propertyId: 'datePropertyID', condition: 'isBefore', values: []})
const resulta = CardFilter.isClauseMet(filterClauseIsBeforeEmpty, [template], dateCard)
expect(resulta).toBeTruthy()
const filterClauseIsBefore = createFilterClause({propertyId: 'datePropertyID', condition: 'isBefore', values: [beforeRange.toString()]})
const result = CardFilter.isClauseMet(filterClauseIsBefore, [template], dateCard)
expect(result).toBeFalsy()
@ -294,6 +298,10 @@ describe('src/cardFilter', () => {
})
test('verify isAfter clauses', () => {
const filterClauseIsAfterEmpty = createFilterClause({propertyId: 'datePropertyID', condition: 'isBefore', values: []})
const resulta = CardFilter.isClauseMet(filterClauseIsAfterEmpty, [template], dateCard)
expect(resulta).toBeTruthy()
const filterClauseIsAfter = createFilterClause({propertyId: 'datePropertyID', condition: 'isAfter', values: [afterRange.toString()]})
const result = CardFilter.isClauseMet(filterClauseIsAfter, [template], dateCard)
expect(result).toBeFalsy()
@ -308,6 +316,10 @@ describe('src/cardFilter', () => {
})
test('verify is clause', () => {
const filterClauseIsEmpty = createFilterClause({propertyId: 'datePropertyID', condition: 'isBefore', values: []})
const resulta = CardFilter.isClauseMet(filterClauseIsEmpty, [template], dateCard)
expect(resulta).toBeTruthy()
const filterClauseIsBefore = createFilterClause({propertyId: 'datePropertyID', condition: 'is', values: [beforeRange.toString()]})
const result = CardFilter.isClauseMet(filterClauseIsBefore, [template], dateCard)
expect(result).toBeFalsy()

View File

@ -175,6 +175,9 @@ class CardFilter {
return !(value as string || '').endsWith(filter.values[0]?.toLowerCase())
}
case 'isBefore': {
if (filter.values.length === 0) {
return true
}
if (dateValue !== undefined) {
const numericFilter = parseInt(filter.values[0], 10)
if (template && (template.type === 'createdTime' || template.type === 'updatedTime')) {
@ -192,6 +195,9 @@ class CardFilter {
return false
}
case 'isAfter': {
if (filter.values.length === 0) {
return true
}
if (dateValue !== undefined) {
const numericFilter = parseInt(filter.values[0], 10)
if (template && (template.type === 'createdTime' || template.type === 'updatedTime')) {

View File

@ -94,6 +94,7 @@ const GlobalHeaderSettingsMenu = (props: Props) => {
name={intl.formatMessage({id: 'Sidebar.random-icons', defaultMessage: 'Random icons'})}
isOn={randomIcons}
onClick={async () => toggleRandomIcons()}
suppressItemClicked={true}
/>
{me?.is_guest !== true &&
<Menu.Text

View File

@ -163,6 +163,7 @@ const SidebarSettingsMenu = (props: Props) => {
name={intl.formatMessage({id: 'Sidebar.random-icons', defaultMessage: 'Random icons'})}
isOn={randomIcons}
onClick={async () => toggleRandomIcons()}
suppressItemClicked={true}
/>
</Menu>
</MenuWrapper>

View File

@ -124,7 +124,7 @@
</ul>
<div class="secondary-footer__copy">
<small class="disclaimer"><span class="mm-copyright" style="margin-right: 1rem;">© Mattermost, Inc.
2022.</span> <span><a href="https://mattermost.com/terms-of-use/" title="Terms of Service">Terms
2023.</span> <span><a href="https://mattermost.com/terms-of-use/" title="Terms of Service">Terms
of Use</a> <span style="margin: 0 0.5rem;">|</span> <a
href="https://mattermost.com/privacy-policy/" title="Privacy Policy">Privacy Policy</a> <span
style="margin: 0 0.5rem;">|</span> <a href="https://mattermost.com/privacy-policy/cookies/"
@ -186,4 +186,4 @@
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="{{ "js/tabs.js" | absURL }}"></script>
<script src="{{ "js/main.js" | absURL }}"></script>
<script src="{{ "js/main.js" | absURL }}"></script>