Tuesday, July 24, 2012

From the depths of SharePoint's sp.js Pt. 1

<Part 1>

Crack open your favorite browser tools and run:

ExecuteOrDelayUntilScriptLoaded( function() { console.dir( SP.Res ); }, 'sp.js');

The results will be:

LOG: {

 lcid : "1033",

 autocompleteAccessibleMenuName : "Autocomplete Menu",

 autocompleteLoading : "Loading...",

 autocompleteListNotFound : "List Not Found.",

 autocompleteListTooLarge : "List is too large to support Autocomplete.",

 autocompleteNoResults : "Item does not exist.",

 autocompleteTooManyResults : "Enter more of the name to see suggestions.",

 autocompleteList : "List:",

 autocompleteView : "View:",

 noObjectPathAssociatedWithObject : "The object is not associated with an object identity or the object identity is invalid.",

 propertyHasNotBeenInitialized : "The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.",

 collectionHasNotBeenInitialized : "The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.",

 requestEmptyQueryName : "The property or query name is empty.",

 requestHasBeenExecuted : "Request has been executed.",

 requestAbortedOrTimedOut : "The request was aborted or timed out.",

 requestUnexpectedResponseWithStatus : "Unexpected response from server. The status code of response is '{0}'. The status text of response is '{1}'.",

 requestUnexpectedResponse : "Unexpected response from server.",

 invalidUsageOfExceptionHandlingScope : "Incorrect usage of exception handling scope.",

 unknownError : "Unknown Error",

 unknownResponseData : "Unexpected response data from server.",

 notSupportedQueryExpressionWithExpressionDetail : "The query expression '{0}' is not supported.",

 collectionModified : "The collection was modified. Enumeration operation may not execute.",

 cui_AddPerson : "Add Person or Group",

 calendarPrevMonth : "Previous Month",

 calendarNextMonth : "Next Month",

 calendarPrevWeek : "Previous Week",

 calendarNextWeek : "Next Week",

 calendarPrevDay : "Previous Day",

 calendarNextDay : "Next Day",

 oneMore : "1 more item",

 twoMore : "{0} more items",

 collapse : "collapse",

 calendarItemNew : "Add",

 calendarMenuLoading : "Loading items...",

 calendarRecurrenceException : "Exception to Recurring Event",

 calendarRecurrence : "Recurring Event",

 calendarNotifyLoading : "Loading calendar...",

 calendarNotifyUpdating : "Updating...",

 calendarErrorHeader : "Error",

 calendarClientDateOutOfSupportedRangeError : "Specified calendar is out of supported date range.",

 calendarDisabledWhileEditing : "This page may have been modified. You may need to reload this page to render the calendar view.",

 calendarDeleteConfirm : "Are you sure you want to delete this item?",

 calendarDateTimeSeparator : " - ",

 calendarViewEvent : "View Properties",

 calendarOpenItem : "Open",

 calendarResolveError : "No exact match was found for {0}.",

 invalidMerge : "The cells you are trying to merge do not have the same height or width. Change the size of the adjacent cells to match the selected cell before merging.",

 fontSizeUnitPt : "pt",

 fontSizeUnitPx : "px",

 fontSizeUnitEm : "em",

 fontSizeUnitCm : "cm",

 fontSizeUnitIn : "in",

 fontSizeUnitMm : "mm",

 fonts : "Fonts",

 themeFonts : "Theme Fonts",

 errorClipboard : "Your browser is not configured to allow access to your computer's clipboard. Use Control+X for Cut, Control+C for Copy, and Control+V for Paste.",

 clipboardNoAccess : "Your browser is not configured to allow access to your computer's clipboard. ",

 colorPickerStandardHeaderText : "Standard Colors",

 colorPickerThemeHeaderText : "Theme Colors",

 colorPickerMoreColorsText : "More Colors...",

 customBackgroundColorTitle : "Background Color",

 customColorTitle : "Color",

 editHtmlSourceTitle : "HTML Source",

 menuArrangeFloatTitle : "Float",

 menuArrangeInlineTitle : "Inline",

 selectMenuItemWithNumber : "{0} ({1})",

 selectMenuCENTER : "Centered text",

 selectMenuDIR : "Directory list",

 selectMenuFONT : "Font",

 selectMenuPLAINTEXT : "Plain text",

 selectMenuS : "Strikethrough",

 selectMenuSTRIKE : "Strikethrough",

 selectMenuU : "Underline",

 selectMenuXMP : "Plain text block",

 selectMenuRT : "Ruby text",

 selectMenuRUBY : "Ruby",

 selectMenuA : "Anchor",

 selectMenuABBR : "Abbreviation",

 selectMenuACRONYM : "Acronym",

 selectMenuADDRESS : "Address",

 selectMenuB : "Bold",

 selectMenuBDO : "Bi-directional text",

 selectMenuBIG : "Big text",

 selectMenuBLOCKQUOTE : "Quotation",

 selectMenuCAPTION : "Caption",

 selectMenuCITE : "Citation",

 selectMenuCODE : "Code",

 selectMenuDD : "Definition description",

 selectMenuDEL : "Deleted text",

 selectMenuDFN : "Definition",

 selectMenuDIV : "Text division",

 selectMenuDL : "Definition list",

 selectMenuDT : "Definition term",

 selectMenuEM : "Emphasized text",

 selectMenuFIELDSET : "Fieldset",

 selectMenuH1 : "Heading 1",

 selectMenuH2 : "Heading 2",

 selectMenuH3 : "Heading 3",

 selectMenuH4 : "Heading 4",

 selectMenuH5 : "Heading 5",

 selectMenuH6 : "Heading 6",

 selectMenuHR : "Horizontal rule",

 selectMenuI : "Italic",

 selectMenuIMG : "Image",

 selectMenuINS : "Inserted Text",

 selectMenuLABEL : "Label",

 selectMenuLEGEND : "Fieldset legend",

 selectMenuLI : "List Item",

 selectMenuMARQUEE : "Marquee",

 selectMenuMENU : "Menu list",

 selectMenuNOBR : "No line breaks",

 selectMenuOL : "Ordered list",

 selectMenuP : "Paragraph",

 selectMenuPRE : "Pre-formatted text",

 selectMenuQ : "Short quotation",

 selectMenuSAMP : "Sample",

 selectMenuSMALL : "Small text",

 selectMenuSPAN : "Span",

 selectMenuSTRONG : "Strong text",

 selectMenuSUB : "Subscript",

 selectMenuSUP : "Superscript",

 selectMenuTABLE : "Table",

 selectMenuTBODY : "Table body",

 selectMenuTD : "Table cell",

 selectMenuTFOOT : "Table foot",

 selectMenuTH : "Table header cell",

 selectMenuTHEAD : "Table head",

 selectMenuTR : "Table row",

 selectMenuTT : "Teletype text",

 selectMenuUL : "Unordered list",

 onPasteTooltip : "Paste Options",

 pasteTextLabel : "Keep Text Only",

 pasteStripLabel : "Remove Inline Styles",

 pasteHtmlLabel : "Keep Inline Styles",

 onCellTooltip : "Cell Menu",

 deleteRowLabel : "Delete Row",

 deleteColumnLabel : "Delete Column",

 splitCellLabel : "Split Cell",

 insertRowAboveLabel : "Insert Above",

 insertRowBelowLabel : "Insert Below",

 insertColumnLeftLabel : "Insert Left",

 insertColumnRightLabel : "Insert Right",

 pasteWaitScreenTitle : "Paste",

 pasteWaitScreenText : "Pasting...",

 xhtmlWaitScreenTitle : "XHTML",

 xhtmlWaitScreenText : "Converting to XHTML...",

 xhtmlDone : "XHTML conversion completed",

 htmlSourceChangedTitle : "Warning",

 htmlSourceChangedText : "The HTML source you entered might have been modified.",

 keyboardShortcutUndo_AccessKey : "Z",

 keyboardShortcutUndo_Ctrl : "t",

 keyboardShortcutUndo_Shift : "f",

 keyboardShortcutUndo_Alt : "f",

 keyboardShortcutRedo_AccessKey : "Y",

 keyboardShortcutRedo_Ctrl : "t",

 keyboardShortcutRedo_Shift : "f",

 keyboardShortcutRedo_Alt : "f",

 keyboardShortcutSelectAll_AccessKey : "A",

 keyboardShortcutSelectAll_Ctrl : "t",

 keyboardShortcutSelectAll_Shift : "f",

 keyboardShortcutSelectAll_Alt : "f",

 keyboardShortcutBold_AccessKey : "B",

 keyboardShortcutBold_Ctrl : "t",

 keyboardShortcutBold_Shift : "f",

 keyboardShortcutBold_Alt : "f",

 keyboardShortcutItalic_AccessKey : "I",

 keyboardShortcutItalic_Ctrl : "t",

 keyboardShortcutItalic_Shift : "f",

 keyboardShortcutItalic_Alt : "f",

 keyboardShortcutUnderline_AccessKey : "U",

 keyboardShortcutUnderline_Ctrl : "t",

 keyboardShortcutUnderline_Shift : "f",

 keyboardShortcutUnderline_Alt : "f",

 keyboardShortcutClearFormatting_AccessKey : " ",

 keyboardShortcutClearFormatting_Ctrl : "t",

 keyboardShortcutClearFormatting_Shift : "f",

 keyboardShortcutClearFormatting_Alt : "f",

 keyboardShortcutIndent_AccessKey : "M",

 keyboardShortcutIndent_Ctrl : "t",

 keyboardShortcutIndent_Shift : "f",

 keyboardShortcutIndent_Alt : "f",

 keyboardShortcutOutdent_AccessKey : "M",

 keyboardShortcutOutdent_Ctrl : "t",

 keyboardShortcutOutdent_Shift : "t",

 keyboardShortcutOutdent_Alt : "f",

 keyboardShortcutLeftAlign_AccessKey : "L",

 keyboardShortcutLeftAlign_Ctrl : "t",

 keyboardShortcutLeftAlign_Shift : "f",

 keyboardShortcutLeftAlign_Alt : "f",

 keyboardShortcutCenterAlign_AccessKey : "E",

 keyboardShortcutCenterAlign_Ctrl : "t",

 keyboardShortcutCenterAlign_Shift : "f",

 keyboardShortcutCenterAlign_Alt : "f",

 keyboardShortcutRightAlign_AccessKey : "R",

 keyboardShortcutRightAlign_Ctrl : "t",

 keyboardShortcutRightAlign_Shift : "f",

 keyboardShortcutRightAlign_Alt : "f",

 keyboardShortcutMakeHyperlink_AccessKey : "K",

 keyboardShortcutMakeHyperlink_Ctrl : "t",

 keyboardShortcutMakeHyperlink_Shift : "f",

 keyboardShortcutMakeHyperlink_Alt : "f",

 tablePreviewChar : "_",

 textStyleExampleText : "AaBbCcDdEeFfGgHhIiJjKkLlMm",

 reverting : "Reverting...",

 sending : "Sending...",

 emailDefaultBody : "Sample",

 saving : "Saving...",

 saved : "Saved",

 processingRequest : "Processing request...",

 deleting : "Deleting...",

 pageIsSiteHomePage : "This page is now the site homepage.",

 saveChangeDialogTitle : "Save Changes",

 saveChangeDialogDesc : "Do you want to save the changes you made to this page?",

 saveConflictStatusBarTitle : "Save Conflict:",

 saveFailed : "Cannot save the page.",

 buttonYes : "Yes",

 buttonNo : "No",

 buttonCancel : "Cancel",

 layoutsNotSupported : "This feature does not support the Layouts Editor.",

 dropdownImageAltText : "Dropdown",

 checkAltText : "Check",

 uncheckAltText : "Uncheck",

 editListItems : "Edit List Items",

 moreItems : "Not all items are shown...",

 dropdownLoading : "Loading...",

 getDataError : "This service isn't available right now.",

 getDataErrorRetry : "Click here to try again.",

 defaultViewDescription : "Default View",

 personalViewDescription : "Personal View",

 publicViewDescription : "Public View",

 moderationViewDescription : "Moderation View",

 close : "Close",

 restore : "Restore",

 maximize : "Maximize",

 dialogLoading : "Loading...",

 dialogLoadingText : "Please wait while the content loads.",

 hiddenButtonValueBeforeDialog : "Wrap focus to the end of the dialog",

 hiddenButtonValueAfterDialog : "Wrap focus to the beginning of the dialog",

 defaultDialogTitle : "Dialog",

 defaultDialogWidth : "768",

 defaultDialogHeight : "576",

 modelessDialogsNotImplemented : "Modeless dialogs are not implemented.",

 dialogCancelAK : "C",

 confirmWelcomePage : "If you make this page the home page for this site, users will no longer be able to see the old site home page. Do you want to set this page as this site's home page?",

 relationships_UnknownError : "Unknown Error.",

 relationships_RelatedFieldsFetchFailed : "Failed to retrieve related lists for this list.",

 relationships_DocLibHasNoRelatedLists : "The {0} document library does not have any related lists.",

 relationships_ListHasNoRelatedLists : "The {0} list does not have any related lists.",

 relationships_RelatedFetchFieldsTookTooLong : "A timeout occurred while retrieving related lists for this list.",

 relationships_ListFormsFetchFailed : "Failed to retrieve forms for list.",

 relationships_NoNewEditDisplayListForms : "This list does not contain any forms.",

 relationships_DefaultDisplayForm : "Default Display Form",

 relationships_DefaultNewForm : "Default New Form",

 relationships_DefaultEditForm : "Default Edit Form",

 relationships_CTForms : "Content Type Forms",

 relationships_CTDisplayForm : "({0}) Display Form",

 relationships_CTNewForm : "({0}) New Form",

 relationships_CTEditForm : "({0}) Edit Form",

 relationships_ToolTipTitle : "Insert Related Items Web Part",

 dlgTitleDel : "Delete Items",

 dlgTitleCheckin : "Check In Files",

 dlgTitleCheckout : "Check Out Files",

 dlgTitleError : "The server has encountered the following error(s):",

 errorDialogTitleText : "Error",

 genericLoading : "Loading...",

 webPartNotDisplay : "This web part cannot be displayed. Save and stop editing the page to see the web part.",

 viewGroupDefault : "Default",

 viewGroupPersonal : "Personal",

 viewGroupPublic : "Public",

 viewGroupModerated : "Moderated",

 viewGroupOther : "Other",

 modifyViewLabel : "Modify View",

 modifyInDesignerLabel : "Modify in SharePoint Designer (Advanced)",

 workflowSettingsLabel : "Workflow Settings",

 associateWorkflowLabel : "Add a Workflow",

 createWorkflowInDesignerLabel : "Create a Workflow in SharePoint Designer",

 createReUsableWorkflowInDesignerLabel : "Create a Reusable Workflow in SharePoint Designer",

 sendToOtherLocation : "Other Location",

 okButtonCaption : "OK",

 detailsView : "Details",

 thumbnailsView : "Thumbnails",

 filmstripView : "Filmstrip",

 modifyThisView : "Modify this view",

 createView : "Create view",

 editColEditable : "Editable",

 editColReadOnly : "Read Only",

 deleteText : "Delete",

 deleteFailed : "This item could not be deleted",

 requiredField : "This field requires a value.",

 serverCommError : "Unable to communicate with the server.",

 savingToServer : "Changes are currently being saved back to the server.  If you leave now, some of those changes may be lost.",

 changesHaveNotBeenSaved : "Changes have been made that have not yet been saved back to the server.  If you leave now, all of those changes will be lost.",

 docAlreadyExists : "The specified name is already in use.  A summary task cannot have the same name as another summary task in the current list.",

 ganttListName : "Project Tasks",

 createWaitScreenCancel : "Cancel",

 checkInComments : "Comments:",

 okButtonText : "OK",

 continueButtonText : "Continue",

 cancelButtonText : "Cancel",

 okCancelButtonWidth : "6em",

 alignRight : "right",

 pageStateCancelApprovalLabel : "Cancel Approval",

 pageStateDiscardCheckoutLabel : "Discard Check Out",

 pageStateDontSaveLabel : "Exit Without Saving",

 pageStateEditLabel : "Edit",

 pageStateSaveLabel : "Save",

 pageStateCheckinLabel : "Check In",

 pageStateCheckoutLabel : "Check Out",

 pageStateOverrideCheckoutLabel : "Override Check Out",

 pageStatePublishLabel : "Publish",

 pageStateSaveAndStopEditingLabel : "Save and Stop Editing",

 pageStateSubmitForApprovalLabel : "Submit for Approval",

 pageStateUnpublishLabel : "Unpublish",

 pageStateApproveLabel : "Approve",

 pageStateRejectLabel : "Reject",

 pageStateSaveBeforeNavigateUnknownError : "The page took too long to save. You can click "Cancel", and then try to save the page again. If you click "OK", you might lose unsaved data.",

 pageStateSaveBeforeNavigateNotCheckedOutWarning : "To save your changes before continuing, click "OK". To continue without saving changes, click "Cancel".",

 pageStateSaveBeforeNavigateLastChanceWarning : "You have made changes to your page that have not yet been saved. Are you sure you want to discard those changes?",

 tenantAdmin_SiteCollectionNewDialogTitle : "Create Site Collection",

 tenantAdmin_SiteCollectionDeleteDialogTitle : "Delete Site Collections",

 tenantAdmin_SiteCollectionPropertiesDialogTitle : "Site Collection Properties",

 tenantAdmin_SiteCollectionOwnersDialogTitle : "Site Collection Owners",

 tenantAdmin_SiteCollectionDiskQuotaDialogTitle : "Site Collection Disk Quota",

 rteDialog_Height : "175",

 rteDialog_Width : "400",

 renamePageDialog_Title : "Rename Page",

 webPartPageRecycleConfirmation : "Are you sure you want to send this page to the site Recycle Bin?",

 webPartPageDeleteConfirmation : "Are you sure you want to permanently delete this page?"


Some mighty fine messages ready for reuse...  I'll continue to post some more obscure things I'm finding as I dig deeper into the depths of sp.js.  


Anonymous said...

I would expect this to be language specific... right? (I see that the language code lcid in the list). In which case it is very interesting for multilingual implementations!
Bonus question: did you compare with SP 2013 beta?

Matthew Bramer said...

One would hope it's language specific. I posted this mostly b/c of the lcid nested in it. You are very sharp picking up that detail. ;-)

Comparing this with SP 2013 beta, I haven't done so yet. My guess would be the existing properties would stay the same. If it were modified, I would bet M$ would only add more properties.