mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
Remove old translations and code not in use anymore.
Thanks to xet7 !
This commit is contained in:
parent
71b7dcffb5
commit
ba49d4d140
3 changed files with 2 additions and 73 deletions
|
|
@ -84,10 +84,6 @@ BlazeComponent.extendComponent({
|
|||
return this.migrationStatuses.get().fixMissingLists === true;
|
||||
},
|
||||
|
||||
deleteEmptyListsNeeded() {
|
||||
return this.migrationStatuses.get().deleteEmptyLists === true;
|
||||
},
|
||||
|
||||
deleteDuplicateEmptyListsNeeded() {
|
||||
return this.migrationStatuses.get().deleteDuplicateEmptyLists === true;
|
||||
},
|
||||
|
|
@ -177,11 +173,6 @@ BlazeComponent.extendComponent({
|
|||
methodArgs = [boardId];
|
||||
break;
|
||||
|
||||
case 'deleteEmptyLists':
|
||||
methodName = 'deleteEmptyLists.execute';
|
||||
methodArgs = [boardId];
|
||||
break;
|
||||
|
||||
case 'deleteDuplicateEmptyLists':
|
||||
methodName = 'deleteDuplicateEmptyLists.execute';
|
||||
methodArgs = [boardId];
|
||||
|
|
@ -224,10 +215,6 @@ BlazeComponent.extendComponent({
|
|||
{ step: 'update_cards', name: 'Update Cards', duration: 900 },
|
||||
{ step: 'finalize', name: 'Finalize', duration: 400 },
|
||||
],
|
||||
deleteEmptyLists: [
|
||||
{ step: 'convert_shared_lists', name: 'Convert Shared Lists', duration: 700 },
|
||||
{ step: 'delete_empty_lists', name: 'Delete Empty Lists', duration: 800 },
|
||||
],
|
||||
deleteDuplicateEmptyLists: [
|
||||
{ step: 'convert_shared_lists', name: 'Convert Shared Lists', duration: 700 },
|
||||
{ step: 'delete_duplicate_empty_lists', name: 'Delete Duplicate Empty Lists', duration: 800 },
|
||||
|
|
@ -326,10 +313,6 @@ BlazeComponent.extendComponent({
|
|||
self.runMigration('fixMissingLists');
|
||||
Popup.back();
|
||||
}),
|
||||
'click .js-run-migration[data-migration="deleteEmptyLists"]': Popup.afterConfirm('runDeleteEmptyListsMigration', function() {
|
||||
self.runMigration('deleteEmptyLists');
|
||||
Popup.back();
|
||||
}),
|
||||
'click .js-run-migration[data-migration="deleteDuplicateEmptyLists"]': Popup.afterConfirm('runDeleteDuplicateEmptyListsMigration', function() {
|
||||
self.runMigration('deleteDuplicateEmptyLists');
|
||||
Popup.back();
|
||||
|
|
|
|||
|
|
@ -1408,8 +1408,6 @@
|
|||
"card-show-lists-on-minicard": "Show Lists on Minicard",
|
||||
"comprehensive-board-migration": "Comprehensive Board Migration",
|
||||
"comprehensive-board-migration-description": "Performs comprehensive checks and fixes for board data integrity, including list ordering, card positions, and swimlane structure.",
|
||||
"delete-empty-lists-migration": "Delete Empty Lists",
|
||||
"delete-empty-lists-migration-description": "Safely deletes empty duplicate lists. Only removes lists that have no cards AND have another list with the same title that contains cards.",
|
||||
"delete-duplicate-empty-lists-migration": "Delete Duplicate Empty Lists",
|
||||
"delete-duplicate-empty-lists-migration-description": "Safely deletes empty duplicate lists. Only removes lists that have no cards AND have another list with the same title that contains cards.",
|
||||
"lost-cards": "Lost Cards",
|
||||
|
|
@ -1436,7 +1434,6 @@
|
|||
"no-issues-found": "No issues found",
|
||||
"run-migration": "Run Migration",
|
||||
"run-comprehensive-migration-confirm": "This will perform a comprehensive migration to check and fix board data integrity. This may take a few moments. Continue?",
|
||||
"run-delete-empty-lists-migration-confirm": "This will first convert any shared lists to per-swimlane lists, then delete empty lists that have a duplicate list with the same title containing cards. Only truly redundant empty lists will be removed. Continue?",
|
||||
"run-delete-duplicate-empty-lists-migration-confirm": "This will first convert any shared lists to per-swimlane lists, then delete empty lists that have a duplicate list with the same title containing cards. Only truly redundant empty lists will be removed. Continue?",
|
||||
"run-restore-lost-cards-migration-confirm": "This will create a 'Lost Cards' swimlane and restore all cards and lists with missing swimlaneId or listId. This only affects non-archived items. Continue?",
|
||||
"run-restore-all-archived-migration-confirm": "This will restore ALL archived swimlanes, lists, and cards, making them visible again. Any items with missing IDs will be automatically fixed. This cannot be easily undone. Continue?",
|
||||
|
|
@ -1463,7 +1460,6 @@
|
|||
"step-create-missing-lists": "Create Missing Lists",
|
||||
"step-update-cards": "Update Cards",
|
||||
"step-finalize": "Finalize",
|
||||
"step-delete-empty-lists": "Delete Empty Lists",
|
||||
"step-delete-duplicate-empty-lists": "Delete Duplicate Empty Lists",
|
||||
"step-ensure-lost-cards-swimlane": "Ensure Lost Cards Swimlane",
|
||||
"step-restore-lists": "Restore Lists",
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class DeleteDuplicateEmptyListsMigration {
|
|||
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('Error checking if deleteEmptyLists migration is needed:', error);
|
||||
console.error('Error checking if deleteDuplicateEmptyLists migration is needed:', error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ class DeleteDuplicateEmptyListsMigration {
|
|||
results
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Error executing deleteEmptyLists migration:', error);
|
||||
console.error('Error executing deleteDuplicateEmptyLists migration:', error);
|
||||
return {
|
||||
success: false,
|
||||
error: error.message
|
||||
|
|
@ -319,16 +319,6 @@ const deleteDuplicateEmptyListsMigration = new DeleteDuplicateEmptyListsMigratio
|
|||
|
||||
// Register Meteor methods
|
||||
Meteor.methods({
|
||||
'deleteEmptyLists.needsMigration'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('not-authorized', 'You must be logged in');
|
||||
}
|
||||
|
||||
return deleteDuplicateEmptyListsMigration.needsMigration(boardId);
|
||||
},
|
||||
|
||||
'deleteDuplicateEmptyLists.needsMigration'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
|
|
@ -339,36 +329,6 @@ Meteor.methods({
|
|||
return deleteDuplicateEmptyListsMigration.needsMigration(boardId);
|
||||
},
|
||||
|
||||
'deleteEmptyLists.execute'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('not-authorized', 'You must be logged in');
|
||||
}
|
||||
|
||||
// Check if user is board admin
|
||||
const board = ReactiveCache.getBoard(boardId);
|
||||
if (!board) {
|
||||
throw new Meteor.Error('board-not-found', 'Board not found');
|
||||
}
|
||||
|
||||
const user = ReactiveCache.getUser(this.userId);
|
||||
if (!user) {
|
||||
throw new Meteor.Error('user-not-found', 'User not found');
|
||||
}
|
||||
|
||||
// Only board admins can run migrations
|
||||
const isBoardAdmin = board.members && board.members.some(
|
||||
member => member.userId === this.userId && member.isAdmin
|
||||
);
|
||||
|
||||
if (!isBoardAdmin && !user.isAdmin) {
|
||||
throw new Meteor.Error('not-authorized', 'Only board administrators can run migrations');
|
||||
}
|
||||
|
||||
return deleteDuplicateEmptyListsMigration.executeMigration(boardId);
|
||||
},
|
||||
|
||||
'deleteDuplicateEmptyLists.execute'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
|
|
@ -399,16 +359,6 @@ Meteor.methods({
|
|||
return deleteDuplicateEmptyListsMigration.executeMigration(boardId);
|
||||
},
|
||||
|
||||
'deleteEmptyLists.getStatus'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('not-authorized', 'You must be logged in');
|
||||
}
|
||||
|
||||
return deleteDuplicateEmptyListsMigration.getStatus(boardId);
|
||||
},
|
||||
|
||||
'deleteDuplicateEmptyLists.getStatus'(boardId) {
|
||||
check(boardId, String);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue