Put app strings into a YAML file for easy editing by product owner

This commit is contained in:
George Drummond
2018-12-13 15:02:52 -05:00
parent 8eecb62034
commit f806425d91
35 changed files with 845 additions and 246 deletions

View File

@@ -5,7 +5,9 @@
{% if not workspace %}
<a href="{{ url_for('atst.home') }}" class="topbar__link topbar__link--home">
{{ Icon('shield', classes='topbar__link-icon') }}
<span class="topbar__link-label">JEDI Cloud</span>
<span class="topbar__link-label">
{{ "navigation.topbar.jedi_cloud_link_text" | translate }}
</span>
</a>
{% else %}
<a href="{{ url_for('atst.home') }}" class="topbar__link topbar__link--shield" title="JEDI Cloud Home">
@@ -22,13 +24,15 @@
v-on:click='props.toggle'
class="topbar__link topbar__workspace-menu__toggle"
v-bind:class="{ 'topbar__workspace-menu__toggle--open': props.isVisible }">
<span class="topbar__link-label">{{ ("Workspace " + workspace.name) }}</span>
<span class="topbar__link-label">{{ "navigation.topbar.named_workspace" | translate({ "workspace": workspace.name }) }}</span>
<template v-if='props.isVisible'>{{ Icon('caret_up', classes='topbar__link-icon') }}</template>
<template v-else>{{ Icon('caret_down', classes='topbar__link-icon') }}</template>
</button>
<div v-show='props.isVisible' class='topbar__workspace-menu__panel menu'>
<h2 class='menu__heading'>Other Active Workspaces</h2>
<h2 class='menu__heading'>
{{ "navigation.topbar.other_active_workspaces" | translate }}
</h2>
{% if workspaces %}
<ul class='menu__list'>
@@ -44,11 +48,15 @@
{% else %}
<p class='menu__message'>You have no other active JEDI workspaces.</p>
<p class='menu__message'>
{{ "navigation.topbar.no_other_active_workspaces" | translate }}
</p>
{% endif %}
<a href="{{ url_for('requests.requests_form_new', screen=1) }}" class='menu__button usa-button'>Request a new JEDI Workspace</a>
<a href="{{ url_for('requests.requests_form_new', screen=1) }}" class='menu__button usa-button'>
{{ "navigation.topbar.request_workspace_link_text" | translate }}
</a>
</div>
</template>
</div>
@@ -60,7 +68,7 @@
{{ Icon('avatar', classes='topbar__link-icon') }}
</a>
<a href="{{ url_for('atst.logout') }}" class="topbar__link" title='Log out of JEDI Cloud'>
<a href="{{ url_for('atst.logout') }}" class="topbar__link" title='{{ "navigation.topbar.logout_link_title" | translate }}'>
{{ Icon('logout', classes='topbar__link-icon') }}
</a>
</div>

View File

@@ -3,12 +3,12 @@
<nav class='sidenav workspace-navigation'>
<ul>
{{ SidenavItem(
"Projects",
("navigation.workspace_navigation.projects" | translate),
href=url_for("workspaces.workspace_projects", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/projects'),
subnav=None if not user_can(permissions.ADD_APPLICATION_IN_WORKSPACE) else [
{
"label": "Add New Project",
"label": ("navigation.workspace_navigation.add_new_project_label" | translate),
"href": url_for('workspaces.new_project', workspace_id=workspace.id),
"active": g.matchesPath('\/workspaces\/[A-Za-z0-9-]*\/projects'),
"icon": "plus"
@@ -18,12 +18,12 @@
{% if user_can(permissions.VIEW_WORKSPACE_MEMBERS) %}
{{ SidenavItem(
"Members",
("navigation.workspace_navigation.members" | translate),
href=url_for("workspaces.workspace_members", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/members'),
subnav=None if not user_can(permissions.ASSIGN_AND_UNASSIGN_ATAT_ROLE) else [
{
"label": "Add New Member",
"label": ("navigation.workspace_navigation.add_new_member_label" | translate),
"href": url_for("workspaces.new_member", workspace_id=workspace.id),
"active": request.url_rule.rule.startswith('/workspaces/<workspace_id>/members/new'),
"icon": "plus"
@@ -34,7 +34,7 @@
{% if user_can(permissions.VIEW_USAGE_DOLLARS) %}
{{ SidenavItem(
"Budget Report",
("navigation.workspace_navigation.budget_report" | translate),
href=url_for("workspaces.workspace_reports", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/reports')
) }}
@@ -42,7 +42,7 @@
{% if user_can(permissions.EDIT_WORKSPACE_INFORMATION) %}
{{ SidenavItem(
"Workspace Settings",
("navigation.workspace_navigation.workspace_settings" | translate),
href=url_for("workspaces.workspace", workspace_id=workspace.id),
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/edit'),
subnav=None