specify i18n scope for handlebars in JSON files

fixes FOO-1617
flag  = none

[pin-commit-analytics=ea50e2b0d4fce306e05bb90c696904885a3d51da]
[pin-commit-instructure_misc_plugin=9ecb5066b058e4bf166058a43d4a26f8ac7a685b]
[pin-commit-migration_tool=7d1f2b2801502bb427dcebcc7c15398f5801cfe1]
[pin-commit-multiple_root_accounts=0c81b2b76e8463a2ab8c873230934d3ec79337f9]

each handlebars template is now expected to be accompanied by a sibling
.json file that specifies the i18n scope to use for {{#t}} calls in that
template:

    {
      "i18nScope": "foo.bar"
    }

this lets us rename the file without affecting the scope

when a template is missing this property (or the json file) and makes a
call to {{t}} or {{#t}}, the build will abort with a helpful message to
direct the author to address the issue

in the process, this also removed two dead-code templates:

- app/views/jst/calendar/appointmentGroupList.handlebars
- app/views/jst/calendar/schedulerRightSideAdminSection.handlebars

== test plan

- go to user preferences page and change locale to something other than
  english that you can verify, and then verify the strings on that page
  are still translated

- remove one of the *.handlebars.json files that were introduced by
  this patch, run webpack and verify the build fails

Change-Id: Ia745dc2000615b55866abc570aa08b5cdbfae93e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258936
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
This commit is contained in:
Ahmad Amireh 2021-02-17 11:40:28 -07:00
parent 75a09cce68
commit ef4f3af11b
354 changed files with 1118 additions and 189 deletions

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.aria_announcer"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.assignment_information.actions"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.assignment_information.details"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.assignment_information.index"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.assignments"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.components.assignment_subtotal_grades"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.components.custom_column_cell"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.components.final_grade_override"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.components.final_grade"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.components.grading_cell"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.content_selection.assignment"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.content_selection.header"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.content_selection.outcome"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.content_selection.selection_buttons"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.content_selection.student"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.gradebook_header"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.grading"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.learning_mastery"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.outcome_information"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.screenreader_gradebook"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.assignment_toggles_and_actions"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.grading_period_select"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.header"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.mastery_toggles_and_actions"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.section_select"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.settings.sort_select"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.student_information.assignment_subtotals"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.student_information.details"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "screenreader_gradebook.student_information.index"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "shared.components.ic_submission_download_dialog"
}

View File

@ -33,52 +33,11 @@
padding-bottom: 25px;
}
.showing-single {
.appointment-group-item {
display: none;
}
.appointment-group-item.active {
display: flex;
}
.appointment-group-item {
border-top: none;
}
}
#scheduler-loading {
position: relative;
min-height: 400px;
}
#appointment-group-list {
list-style: none;
}
.appointment-group-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
border-top: 1px solid #ccc;
min-height: 68px;
padding: 6px 0 26px;
clear: both;
h3, .h3 {
margin-bottom: 0;
}
.alert {
float: direction(right);
width: auto;
padding: 4px 10px;
margin-#{direction(right)}: 5px;
a {
text-decoration: underline;
}
}
&:first-child {
border-top: none;
}
}
.unpublished-ag {
background-color: #f2f2f2;
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignment_details_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "combo_box"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "curve_grades_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "dialog_form_wrapper"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "discussion_topics.edit_view"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "discussion_topics.published_button"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "discussion_topics.page_nav"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "empty_dialog_form_wrapper"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "external_tools.external_content_return_view"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "external_tools.external_tool_menuitem"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "external_tools.external_tools_menu"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "find_flickr_image_result"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "find_flickr_image_view"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "grade_display_warning_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "keyboard_nav_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "media_comments"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "move_outcome_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "paginated_view"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "pairing_code_user_observees"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "post_grades_frame_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "set_default_grade_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "submission_details_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "tree_browser"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "tree_collection"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "tree_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "user_observee"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "avatar"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "grading_box"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "message_students_who_recipient_list"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "plagiarism_score"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "sis_button"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "spinner"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "submission_detail"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "turnitin_info"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "turnitin_score"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "vdd_tooltip"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "vericite_info"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "vericite_score"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.admin_tools"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_search_form"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_search_results"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.restore_content_pane"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.auth_logging_content_pane"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.auth_logging_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.auth_logging_search_results"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.autocomplete"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.comm_message_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.comm_messages_content_pane"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.comm_messages_search_overview"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.comm_messages_search_results"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_logging_content"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_logging_details"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_logging_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.course_logging_results"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.date_range_search"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.grade_change_logging_content"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.grade_change_logging_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.grade_change_logging_results"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.logging_content_pane"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.admin_tools.user_date_range_search_form"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.settings.manual_quotas"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.settings.quotas"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.user"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "accounts.users_list"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignments.assignment_group_create_dialog"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignments.assignment_group_list"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignments.assignment_group_list_item"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignments.assignment_group_selector"
}

View File

@ -0,0 +1,3 @@
{
"i18nScope": "assignments.assignment_group_weights"
}

Some files were not shown because too many files have changed in this diff Show More