Pages

Tuesday, November 6, 2018

Episerver Widgets Resources for Text, Labels, and Styles

I have been doing more component and widget building in Episerver lately, and I have been digging around trying to find references to labels and text being used in widgets or referenced in other areas. I had to dig around to find some things, and instead of continually digging next time I need them, I decided to add them here. I also came across the Episerver style guide in my search for information, so I added that here as well. If I come across other references I need to use in the future, I'll update this with them also.

So, to clarify, this is really here to make it easier for me to find things I need in the future, but if you need this information and find it helpful, it's here for you too.

Why use these?

Before going too far, I want to clarify why I am using these instead of just putting the labels or text in the Dojo widget or component JS file. Each of these references is used for localization/internationalization by calling it with the "Dojo/i18n" module. This means that when a user selects a different language preference for their account, the text in your widget will reflect that change the same way the edit interface displays language specific text. This makes your widget much friendlier to users who don't read or speak your same native language.

Resources

I am listing these according to the full module path used to include them. This includes the "i18n" prefix. Also, this isn't comprehensive to all the references available, as there are additional files in the various "nls" folders inside the "modules/_protected/CMS" and "modules/_protected/Shell" directories. These are just the ones I have needed with the past couple components and widgets I wrote, and these are the ones I want to save for now.

epi/i18n!epi/cms/nls/episerver.cms.contentediting.editors.collectioneditor

Here, the first part of the end, "episerver.cms.contentediting" is the container, and "editors.collectioneditor" is the reference to the JS object I am using for this widget. If I wanted to reference the contentarea text, I would change the last part to "editors.contentarea".
[pre class="brush:js; class-name:'collapse-box'"]
define({
    "autosave": {
        "error": "Could not save property, and it has been reverted. Please try again.",
        "title": "Autosave error"
    },
    "command": {
        "showonlycontentin": "Show Content in Current Language Only"
    },
    "contentdetails": {
        "command": {
            "accessrights": {
                "label": "Access Rights",
                "tooltip": "Manage access rights"
            },
            "dynamicproperties": {
                "label": "Dynamic Properties",
                "tooltip": "Manage dynamic properties"
            },
            "languagesettings": {
                "label": "Language Settings",
                "tooltip": "Manage language settings"
            }
        },
        "existinglanguages": "Languages",
        "idandtypename": "ID, Type",
        "toolsbutton": {
            "label": "Tools",
            "tooltip": "More options for the content"
        },
        "visibleto": {
            "everyone": "Everyone",
            "restricted": "Restricted",
            "title": "Visible to"
        }
    },
    "editactionpanel": {
        "awaitingyourapproval": {
            "button": "Approve?",
            "label": "Awaiting your review"
        },
        "buttonlabel": {
            "option": "Options",
            "publish": "Publish?"
        },
        "currentlyinreview": {
            "label": "Currently in review"
        },
        "publishactionmenu": {
            "actionmessage": {
                "checkedin": "\n                  Status is set to 'Ready to Publish'\n                ",
                "checkingin": "\n                  Updating status…\n                ",
                "errors": {
                    "publish": "An error occurred while publishing"
                },
                "published": "\n                  Published\n                ",
                "publishing": "\n                  Publishing…\n                ",
                "rejected": "\n                  Status is set to 'Rejected'\n                ",
                "rejecting": "\n                  Updating status…\n                "
            },
            "approvalinfo": {
                "approvalmissing": "Something went wrong with the Approval Sequence. Please abort it and try again, or contact an administrator.",
                "requestedby": "Requested by {username}, {time}",
                "stepinfo": "Currently in step {activeStepIndex} out of {totalsteps}",
                "timepassed": "In review for: <br/> <strong>{timepassed}</strong>"
            },
            "currentlypublished": "Currently published version by",
            "download": "Download this file",
            "inusewarning": "{username} is currently editing this page, and you should wait for your turn so that you do not overwrite each other's changes.",
            "lastchangestatus": "Last changed by {username},<br/>{timepassed} ago.",
            "lastpublishedby": "Last published by",
            "lastpublishedviewlinktooltip": "View the published page",
            "notmodifiedsincelastpublish": "Not changed since last publish",
            "notpublishedbefore": "Not published yet",
            "nottranslated": "Not translated to {languageName} ({languageId})",
            "previouslypublished": "Previously published version by {username},<br/> {time}.",
            "projectdelayedpublish": "This item cannot be edited because it is part of the scheduled project <strong>{project}</strong> which will be published <strong>{date}</strong>",
            "publishedtime": "{username}, {time}",
            "rejectedapproval": "Changes declined by {username},<br/> {time}",
            "reverttopublishconfirmation": {
                "confirmquestion": "Are you sure you want to revert to the published version?",
                "description": "All changes that have been made so far in this version will be discarded.",
                "dialogtitle": "Revert to Published"
            },
            "successfullypublished": "Successfully published",
            "view": "View on website"
        },
        "status": {
            "changestopublish": "Changes to be published",
            "deleted": "Deleted",
            "expired": "Expired",
            "inuse": "${0} is editing",
            "nochangetopublish": "No changes to publish",
            "notcreated": "Not created",
            "notpublishedyet": "Not published yet",
            "previouslypublished": "Previously published",
            "published": "Published",
            "readytopublish": "Ready to publish",
            "rejected": "Changes were declined",
            "scheduledpublish": "Will be published on ${0}"
        }
    },
    "editingnotification": {
        "multiusers": "This page is currently being edited by <b>{0}</b> and <b>{1}</b>. If you edit the page simultaneously, perhaps you will overwrite each other's changes. Would you like to continue?",
        "singleuser": "This page is currently being edited by <b>{0}</b>. If you edit the page simultaneously, perhaps you will overwrite each other's changes. Would you like to continue?"
    },
    "editors": {
        "collectioneditor": {
            "noitems": "There are no items available.",
            "title": "Item Details"
        },
        "contentarea": {
            "addmore": "Add More",
            "displayoptions": {
                "automatic": "Automatic",
                "label": "Display As: {0}",
                "title": "Display options"
            },
            "emptymessage": "Drag blocks and pages here",
            "groupdropmoremessage": "Drop more content here",
            "personalize": {
                "contentgroup": "Content group",
                "everyone": "Everyone",
                "everyoneelsesee": "<em>Everyone</em> else sees",
                "everyoneelsewarning": "Since this occurs after \"everyone else\"-rule, no one will see it.",
                "everyonesees": "<em>Everyone</em> sees",
                "groupcannotsees": "<em>No one</em> sees this because the visitor group does not exist anymore",
                "grouplabel": "Personalized Group",
                "groupsand": "and ",
                "groupsees": "{groupName} sees",
                "groupssee": "{groupNames} see",
                "label": "Personalize",
                "moveoutsidegroup": "Move Outside Group",
                "whocansee": "Who can see this content?"
            }
        },
        "datetimenow": {
            "now": "Now"
        },
        "dialogwithcheckboxlisteditor": {
            "all": "All",
            "none": "None",
            "of": "${selected} of ${total}"
        },
        "itemcollection": {
            "emptyactions": {
                "actions": {
                    "createnewitem": "create a new link"
                },
                "template": "You can drop content here.<br/>You can also {createnewitem}."
            },
            "menutooltip": "Display Menu"
        }
    },
    "futurepublishingdate": {
        "message": "The Publishing date is set to ${0}"
    },
    "invalidtransition": "The action can not be performed on this content in it's current state. Please reload the page.",
    "languagenotification": {
        "fallback": "This page is visible in <strong>{1}</strong>, but the content is in <strong>{0}</strong>. To edit it, you need to translate it to <strong>{1}</strong>.",
        "fallbackwarning": "This content is shown in <strong>{0}</strong> on the website because it has not been published in <strong>{1}</strong> and a fallback language has been activated.",
        "languagenotavailable": "This content is in <strong>{0}</strong>. It does not exist in <strong>{1}</strong>. Would you like to translate it now?",
        "languagenotenabled": "The selected language is not available. ",
        "nottranslatedswitchto": "This content is in <strong>{0}</strong>, it does not exist in <strong>{1}</strong>. To translate it, ",
        "replacement": "For visitors, this page is replaced by a version in {0}.",
        "sharedproperty": "This property is shared between all languages and can only be edited in the master language",
        "switchto": "switch to {0}",
        "unspecifiedlanguage": "unspecified language",
        "workinginwrongsite": "You are working in <strong>{0}</strong>, this content is in <strong>{1}</strong>. To edit it, "
    },
    "notificationbar": {
        "affect": "Changes made here will affect at least ",
        "referencestooltip": "Show the list of affected content"
    },
    "permanenteditindication": {
        "label": "When enabled, this page will appear as being edited by you even if you log off or stop editing.",
        "permanenteditison": "Permanent editing markup is on. This page will appear as being edited by you even if you log off or stop editing.",
        "title": "Permanently Mark as Being Edited",
        "tooltip": "Toggle content in use on or off"
    },
    "publish": {
        "error": "Sorry, an error has occurred. Please try again later.",
        "nochange": "There are no pending changes to be published.",
        "success": "The page was successfully published. Go to preview?"
    },
    "shortcutnotification": {
        "external": "\"Shortcut type\" is set to \"Shortcut to page on another website\". This means that content is retrieved from the specified address.",
        "fetchdata": "\"Shortcut type\" is set to \"Fetch content from another content item\". This means that content is retrieved from another content item.",
        "inactive": "\"Shortcut type\" is set to \"No shortcut, display text only\". This means that the content will not be visible and the page's name in the menu will not be linked.",
        "shortcut": "\"Shortcut type\" is set to \"Shortcut to another content item\". This means that the visitor is redirected when the page's name is clicked. "
    },
    "toolbar": {
        "buttons": {
            "autosave": {
                "autosavelabel": "Autosaved",
                "lastchange": "Last change",
                "offlinelabel": "Offline, can't save",
                "savinglabel": "Saving…",
                "title": "Changes are autosaved",
                "undolabel": "Undo?"
            },
            "cancelandedit": {
                "label": "Remove Scheduling and Edit",
                "title": "Remove Scheduling and Edit"
            },
            "close": {
                "title": "Exit edit mode for current page and save changes."
            },
            "createcontent": {
                "title": "Create content"
            },
            "createdraft": {
                "label": "New Draft from Here",
                "title": "New Draft from Here"
            },
            "edit": {
                "title": "Edit current page"
            },
            "editcommondraft": {
                "label": "Edit Primary Draft",
                "title": "Edit Primary Draft"
            },
            "editdraft": {
                "label": "Edit the Draft",
                "title": "Edit the Draft"
            },
            "formedit": {
                "label": "All Properties",
                "title": "All Properties"
            },
            "ignoreinusenotification": {
                "label": "Edit Anyway",
                "title": "Ignore in use notification and edit"
            },
            "onpageedit": {
                "label": "On-Page Editing",
                "title": "On-Page Editing"
            },
            "publish": {
                "executinglabel": "Publishing…",
                "label": "Publish",
                "title": "Publish"
            },
            "publishchanges": {
                "executinglabel": "Publishing changes…",
                "label": "Publish Changes",
                "title": "Publish Changes"
            },
            "publishhistory": {
                "label": "View Publish History",
                "title": "View Publish History"
            },
            "redo": {
                "title": "Redo last change"
            },
            "republish": {
                "executinglabel": "Republishing…",
                "label": "Republish",
                "title": "Republish"
            },
            "reverttopublished": {
                "label": "Revert to Published",
                "title": "Revert to published version"
            },
            "scheduleforpublish": {
                "label": "Schedule for Publish",
                "title": "Schedule for Publish"
            },
            "sendforreview": {
                "executinglabel": "Sending…",
                "label": "Ready to Publish",
                "title": "Page version is ready to publish"
            },
            "toggleassetspane": "Toggle assets pane",
            "togglenavigationpane": "Toggle navigation pane",
            "togglepreviewmode": {
                "label": "Toggle preview mode",
                "message": "Previewing"
            },
            "translate": {
                "executinglabel": "Translating…",
                "label": "Translate",
                "title": "Translate"
            },
            "undo": {
                "title": "Undo last change"
            },
            "viewsetting": {
                "language": "Content language is English (US)",
                "viewsettingbutton": "Toggle view settings"
            },
            "withdraw": {
                "label": "Withdraw and Edit",
                "title": "Withdraw and Edit"
            }
        }
    },
    "versionstatus": {
        "awaitingapproval": "This content is in review",
        "checkedin": "Waiting to be published",
        "checkedout": "Not visible until published",
        "delayedpublish": "Scheduled to be published",
        "expired": "This content has expired",
        "notcreated": "This content is not created",
        "previouslypublished": "Was previously published",
        "published": "Published",
        "rejected": "This content has been rejected",
        "translationrequired": "This content is not available in the current language",
        "versionnotfound": "This version no longer exists"
    },
    "views": {
        "contentlisting": {
            "description": "Display the child items list",
            "name": "Content Listing"
        },
        "formediting": {
            "description": "Edit the content in all properties mode",
            "name": "All Properties"
        },
        "onpageediting": {
            "description": "Edit the content in on-page mode",
            "name": "On-Page Editing"
        }
    },
    "viewsettingsnotification": {
        "visitorgroups": {
            "noaccessright": "You do not have access rights to view personalized content."
        }
    }
});
[/pre]

epi/i18n!epi/nls/episerver.shared

I am using this one for the "action" and "header" text for buttons and responses.
[pre class="brush:js;class-name:'collapse-box'"]
define({
    "action": {
        "add": "Add",
        "cancel": "Cancel",
        "change": "Change",
        "choose": "Choose",
        "close": "Close",
        "copy": "Copy",
        "create": "Create",
        "cut": "Cut",
        "deletelabel": "Delete",
        "disable": "Disable",
        "done": "Done",
        "dontshowagain": "Do not show again",
        "edit": "Edit",
        "help": "Help",
        "ignore": "Ignore",
        "install": "Install",
        "learnmore": "Learn more",
        "login": "Log in",
        "manage": "Manage",
        "more": "More",
        "moveanyway": "Move Anyway",
        "movedown": "Move Down",
        "moveup": "Move Up",
        "new": "New",
        "no": "No",
        "ok": "OK",
        "options": "Options",
        "paste": "Paste",
        "post": "Post",
        "publish": "Publish",
        "redo": "Redo",
        "refresh": "Refresh",
        "reject": "Reject",
        "remove": "Remove",
        "rename": "Rename",
        "save": "Save",
        "saved": "Saved",
        "search": "Search",
        "select": "Select",
        "selectall": "Select All",
        "undo": "Undo",
        "uninstall": "Uninstall",
        "update": "Update",
        "view": "View",
        "yes": "Yes"
    },
    "header": {
        "all": "All",
        "available": "Available",
        "by": "By",
        "category": "Category",
        "changed": "Changed",
        "created": "Created",
        "currency": "Currency",
        "description": "Description",
        "episerver": "EPiServer",
        "expires": "Expires",
        "id": "ID",
        "language": "Language",
        "message": "Message",
        "name": "Name",
        "owner": "Owner",
        "removed": "Removed",
        "saved": "Saved",
        "status": "Status",
        "type": "Type"
    },
    "language": {
        "da": "Danish",
        "de": "German",
        "en": "English",
        "en-gb": "English (United Kingdom)",
        "en-nz": "English (New Zealand)",
        "en-za": "English (South Africa)",
        "es": "Spanish",
        "fi": "Finnish",
        "fr": "French",
        "nl": "Dutch",
        "nl-be": "Dutch (Belgium)",
        "no": "Norwegian",
        "pt-br": "Portuguese (Brazil)",
        "sv": "Swedish"
    },
    "messages": {
        "failedloadingwidget": "A user interface component of type [${0}] failed to load.",
        "nopermissiontoviewdata": "You do not have access rights to view versions",
        "notinuse": "This item is not used anywhere.",
        "numberofitemstodisplay": "Number of items to display",
        "unexpectederror": "An unexpected error occurred, please contact your system administrator"
    },
    "text": {
        "anyone": "anyone",
        "by": "by",
        "day": "day",
        "days": "days",
        "hour": "hour",
        "hours": "hours",
        "installer": "installer",
        "item": "item",
        "items": "items",
        "minute": "minute",
        "minutes": "minutes",
        "second": "second",
        "seconds": "seconds",
        "today": "Today",
        "yesterday": "Yesterday",
        "youobject": "you",
        "yousubject": "You"
    },
    "validation": {
        "required": "The {0} field is required."
    }
});
[/pre]

Episerver Style Guide

Episerver has made their UX Style Guide available publicly for developers to reference when needed. I find this very helpful when I am working on components and widgets and want to keep some of my custom elements in line with the Epi UX.

You can find this guide here: http://ux.episerver.com/

No comments:

Post a Comment

Share your thoughts or ask questions...