refactor: simplify translations — shared utils, deduplicated code
- Extract shared constants to client/src/utils/translations.js (AVAILABLE_LANGUAGES, TRANSLATION_STATUS_COLORS, isTextSelected, groupTextsByLanguage) - TranslationDetailPanel: deduplicate copy button JSX, hoist hasSelected - PublicTranslationReview: memoize textsByLanguage, use shared isTextSelected - Translations page: import from shared module - Server: translation schema updates, post_id linking - Add reassign-user utility script - Add new translation i18n keys to en.json and ar.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+48
-4
@@ -922,6 +922,30 @@
|
||||
"review.confirmRejectPostDesc": "Are you sure you want to reject this post? Please provide feedback explaining why.",
|
||||
"review.feedbackRequired": "Feedback (required)",
|
||||
"review.feedbackRequiredError": "Please provide feedback when rejecting",
|
||||
"review.loadFailed": "Failed to load review",
|
||||
"review.errorTitle": "Error",
|
||||
"review.thankYou": "Thank you for your review!",
|
||||
"review.approveSuccess": "Translation approved successfully!",
|
||||
"review.rejectSuccess": "Translation has been rejected.",
|
||||
"review.revisionSuccess": "Revision requested successfully.",
|
||||
"review.nameRequired": "Please provide your name",
|
||||
"review.yourReview": "Your Review",
|
||||
"review.selectYourName": "Select your name",
|
||||
"review.selectApprover": "Select approver...",
|
||||
"review.yourName": "Your Name",
|
||||
"review.enterYourName": "Enter your name...",
|
||||
"review.feedback": "Feedback",
|
||||
"review.feedbackPlaceholder": "Share your thoughts or feedback...",
|
||||
"review.approve": "Approve",
|
||||
"review.approved": "Approved",
|
||||
"review.rejected": "Rejected",
|
||||
"review.requestRevision": "Request Revision",
|
||||
"review.reject": "Reject",
|
||||
"review.statusLabel": "Status",
|
||||
"review.reviewedBy": "Reviewed by",
|
||||
"review.confirmReject": "Confirm Rejection",
|
||||
"review.rejectConfirmDesc": "Are you sure you want to reject this translation? Please make sure you have provided feedback.",
|
||||
"review.feedbackRequiredForReject": "Please provide feedback before rejecting.",
|
||||
"posts.versions": "Versions",
|
||||
"posts.newVersion": "New Version",
|
||||
"posts.createNewVersion": "Create New Version",
|
||||
@@ -961,7 +985,6 @@
|
||||
"translations.status": "Status",
|
||||
"translations.languagesLabel": "Languages",
|
||||
"translations.languagesCount": "languages",
|
||||
"translations.updated": "Updated",
|
||||
"translations.grid": "Grid",
|
||||
"translations.list": "List",
|
||||
"translations.allBrands": "All Brands",
|
||||
@@ -991,9 +1014,9 @@
|
||||
"translations.draftSaved": "Draft saved!",
|
||||
"translations.failedSaveDraft": "Failed to save draft",
|
||||
"translations.saveDraft": "Save Draft",
|
||||
"translations.saveDraftTooltip": "Save changes to title, description, and source content",
|
||||
"translations.saveDraftTooltip": "Save changes to title and source content",
|
||||
"translations.savingDraft": "Saving...",
|
||||
"translations.updated": "Updated!",
|
||||
"translations.updated": "Updated",
|
||||
"translations.failedUpdate": "Failed to update",
|
||||
"translations.addTranslation": "Add Translation",
|
||||
"translations.translationAdded": "Translation added!",
|
||||
@@ -1021,5 +1044,26 @@
|
||||
"translations.approvedByLabel": "Approved by",
|
||||
"translations.pendingReviewInfo": "This translation is currently pending review.",
|
||||
"translations.noReviewInfo": "No review information available.",
|
||||
"translations.failedDelete": "Failed to delete"
|
||||
"translations.failedDelete": "Failed to delete",
|
||||
"translations.addOption": "Add Option",
|
||||
"translations.option": "option",
|
||||
"translations.options": "options",
|
||||
"translations.optionLabel": "Option",
|
||||
"translations.selected": "Selected",
|
||||
"translations.selectThis": "Select",
|
||||
"translations.optionSelected": "Option selected!",
|
||||
"translations.suggestAlternative": "Suggest alternative",
|
||||
"translations.suggestForLang": "Suggest a translation for",
|
||||
"translations.enterSuggestion": "Enter your suggested translation...",
|
||||
"translations.submitSuggestion": "Submit Suggestion",
|
||||
"translations.suggestionAdded": "Suggestion added!",
|
||||
"translations.existing": "existing",
|
||||
"translations.copyContent": "Copy to clipboard",
|
||||
"translations.copiedToClipboard": "Copied to clipboard!",
|
||||
"translations.approvedReadOnly": "This translation is approved and cannot be modified.",
|
||||
"translations.linkedPost": "Linked Post",
|
||||
"translations.createPost": "New Post",
|
||||
"translations.newPostTitle": "Post title...",
|
||||
"translations.postCreated": "Post created!",
|
||||
"translations.postCreateFailed": "Failed to create post"
|
||||
}
|
||||
Reference in New Issue
Block a user