Localized dashboard/files page (#1960)#5359
Conversation
Replace hard coded english labels with i18n keys for buttons like refresh, new files, new directory, copy/move, and delete Add English and zh-CN strings
| <th><span class="sr-only">Type</span></th> | ||
| <th>Name</th> | ||
| <th><span class="sr-only">Actions</span></th> | ||
| <th><span class="sr-only"><%= t('dashboard.files_turboframe.type') %></span></th> |
There was a problem hiding this comment.
Simple/single works like Type should be just simple/single word keys like dashboard.type. That promotes reuse and also simplicity.
There was a problem hiding this comment.
I think you added this file by accident. Furthermore, if this is a development config - you should be using a directory outside of the git tree. Mostly for this exact reason - so you don't accidentally commit it.
* localize active_jobs/index.html.erb * localize active_jobs/_job_details_node_view.html.erb * localize active_jobs/extended_data_table.html.erb --------- Co-authored-by: Braeden Singleton <bsingleton@osc.edu>
| <%= link_to image_tag( build_ganglia_link(data.cluster, data.starttime, 'load_report', node, 'small'), class:"img-responsive col-lg-auto col-md-auto col-sm-auto col-xs-auto", alt: "Ganglia image for system load averages." ), build_ganglia_link(data.cluster, data.starttime, 'load_report', node, 'large'), data: { lightbox: "load-report", title: "Load Report " + node } %> | ||
| <%= link_to image_tag( build_ganglia_link(data.cluster, data.starttime, 'mem_report', node, 'small'), class:"img-responsive col-lg-auto col-md-auto col-sm-auto col-xs-auto", alt: "Ganglia image for Memory usage." ), build_ganglia_link(data.cluster, data.starttime, 'mem_report', node, 'large'), data: { lightbox: "mem-report", title: "Memory Report " + node } %> | ||
| <%= link_to image_tag( build_ganglia_link(data.cluster, data.starttime, 'network_report', node, 'small'), class:"img-responsive col-lg-auto col-md-auto col-sm-auto col-xs-auto", alt: "Ganglia image for network usage." ), build_ganglia_link(data.cluster, data.starttime, 'network_report', node, 'large'), data: { lightbox: "network-report", title: "Network Report " + node } %> | ||
| <%= link_to image_tag( build_ganglia_link(data.cluster, data.starttime, 'cpu_report', node, 'small'), class:"img-responsive col-lg-auto col-md-auto col-sm-auto col-xs-auto", alt: t('dashboard.active_jobs_ganglia_alt_cpu')), build_ganglia_link(data.cluster, data.starttime, 'cpu_report', node, 'large'), data: { lightbox: "cpu-report", title: "#{t('dashboard.cpu_report')} #{node}" } %> |
There was a problem hiding this comment.
Let's pass the node info to the localization in case the order changes for other languages
|
Somehow #5363 was added here as an additional commit instead of merging with master. In your terminal, switch to the localization-1960 branch and run |
| batch_connect_form_type_new_name_error: 请输入一个有效的名称以继续 | ||
| batch_connect_invalid_form_array: "'form' 元素在 form.yml 中不是数组" | ||
| batch_connect_invalid_form_attributes: "'attributes' 元素在 form.yml 中不是映射" | ||
| batch_connect_invalid_form_array: '''form'' 元素在 form.yml 中不是数组' |
There was a problem hiding this comment.
These quotes are going to cause issues. I already corrected them in en.yml as part of #5363, but this demonstrates the difficulty of keeping all of this straight when we are editing multiple locale files. If these are your original translations then I think there is value there compared to the AI workflow, and you just need to review it to ensure it is up to date with the formatting of en.yml. It still may be easier however to just revert this file, let the weekly automation generate the new translations, and then open a PR to update anything you think can be improved.
--------- Co-authored-by: Braeden Singleton <bsingleton@osc.edu>
|
Not quite sure how to proceed with this due to the fact that it duplicates changes from #5363 and #5439. I attempted removing those commits via rebase, but the subsequent ones then fail merge conflicts because they occur before the merge with master. The end state seems fine, maybe I am overreacting and the duplication won't cause problems? Alternatively I can maybe just squash these changes together within the branch, so we generate a single commit between current master and the proposed changes. @johrstrom any advice? |
Replaced hard coded English texts with i18n keys in app/views/files files used for /dashboard/files path.