Skip to content

Commit 5e5738d

Browse files
author
Sami Kolari
committed
enable landuage selector, fix missing localisations
1 parent 736493f commit 5e5738d

File tree

10 files changed

+74
-59
lines changed

10 files changed

+74
-59
lines changed

src/components/CommunityItems.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
class="col-md-2 pl-medium"
4545
:style="$store.state.isMobile ? 'padding-left: 4.7rem; margin-top: 1rem;' : ''">
4646
<h3 class="color-grey-dark color-white-darkmode mb-2xsmall">
47-
Other
47+
{{ $t('common.other') }}
4848
</h3>
4949
<div
5050
v-for="link in items.slice(3)"
@@ -93,7 +93,7 @@ export default {
9393
title: 'Facebook'
9494
}, {
9595
href: 'http://groups.google.com/group/robotframework-users',
96-
title: 'Mailing list'
96+
title: this.$t('community.links.mailingList')
9797
}
9898
]
9999
}

src/components/CompanyCarousel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</div>
7272
<button class="theme mt-small">
7373
<router-link :to="{ name: 'Users' }" class="type-no-underline">
74-
More users
74+
{{ $t('introduction.moreUsers') }}
7575
</router-link>
7676
</button>
7777
</div>

src/components/NavMobile.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default {
211211
left: 50%;
212212
}
213213
214-
@media screen and (min-width: 769px) {
214+
@media screen and (min-width: 951px) {
215215
.navbar, .menu {
216216
display: none;
217217
}

src/components/Navbar.vue

+10-7
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
v-for="item in $tm('navbar.items')"
88
:key="item.name"
99
:name="`go-to-${item.name}`"
10-
class="pl-small pr-small color-white font-title type-uppercase type-no-underline border-right-white"
10+
class="pl-small pr-small color-white font-title type-uppercase type-no-underline border-right-white type-small"
1111
@click="itemClick(item.id)">
1212
{{ item.name }}
1313
</button>
1414
<!-- external links -->
1515
<div class="relative" ref="dropdown">
1616
<button
17-
class="pl-small pr-small font-title type-uppercase line-height-body"
17+
class="pl-small pr-small font-title type-uppercase type-small"
1818
:class="linkDropdownOpen ? 'color-theme' : 'color-white'"
19+
style="transform: translateY(2px);"
1920
@click="linkDropdownOpen = !linkDropdownOpen">
2021
{{ $t('navbar.dropdownName') }}
2122
</button>
@@ -42,17 +43,17 @@
4243
</div>
4344
</transition>
4445
</div>
45-
<!-- lang - disabled for now
4646
<button
4747
class="border-left-white font-title type-uppercase pl-small relative line-height-body"
4848
@click="langDropdownOpen = !langDropdownOpen">
4949
<div
50-
class="flex middle">
50+
class="flex middle"
51+
style="transform: translateY(2px);">
5152
<globe-icon
5253
:color="langDropdownOpen ? 'theme' : 'white'"
5354
style="transform: translateY(-1px);" />
5455
<div
55-
class="pl-3xsmall type-body"
56+
class="pl-3xsmall type-small"
5657
:class="langDropdownOpen ? 'color-theme' : 'color-white'"
5758
style="transform: translateY(-2px);">
5859
{{ langNames.find(({ lang }) => lang === $i18n.locale).name }}
@@ -74,7 +75,7 @@
7475
</div>
7576
</div>
7677
</transition>
77-
</button> -->
78+
</button>
7879
<transition name="opacity">
7980
<div
8081
v-if="navSticky"
@@ -87,11 +88,13 @@
8788

8889
<script>
8990
import NewTabIcon from './icons/NewTabIcon.vue'
91+
import GlobeIcon from './icons/GlobeIcon.vue'
9092
9193
export default {
9294
name: 'Navbar',
9395
components: {
94-
NewTabIcon
96+
NewTabIcon,
97+
GlobeIcon
9598
},
9699
data: () => ({
97100
navSticky: false,

src/components/PageFooter.vue

+15-34
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
Finland
2020
</div>
2121
<a href="mailto:robotframework-foundation@googlegroups.com">
22-
Contact
22+
{{ $t('footer.contact') }}
2323
</a>
2424
</div>
2525
<div
2626
class="col-sm-6 col-md-3"
2727
:class="$store.state.isMobile ? 'type-right' : ''">
2828
<h3 class="mb-small">
29-
Community
29+
{{ $t('footer.community') }}
3030
</h3>
3131
<div>
3232
<a href="https://github.com/robotframework/robotframework">
@@ -57,37 +57,18 @@
5757
<div v-if="$store.state.isMobile" class="col-sm-12 mb-large" />
5858
<div class="col-sm-6 col-md-3">
5959
<h3 class="mb-small">
60-
Instructions
60+
{{ $t('footer.instructions.title') }}
6161
</h3>
62-
<div>
63-
<a href="https://github.com/robotframework/robotframework/blob/master/INSTALL.rst">
64-
Installation
65-
</a>
66-
</div>
67-
<div>
68-
<a href="https://github.com/robotframework/QuickStartGuide/blob/master/QuickStart.rst">
69-
Quick start
70-
</a>
71-
</div>
72-
<div>
73-
<a href="https://robotframework.org/robotframework/#user-guide">
74-
User guide
75-
</a>
76-
</div>
77-
<div>
78-
<a href="https://github.com/robotframework/WebDemo">
79-
Web demo
80-
</a>
81-
</div>
82-
<div>
83-
<a href="https://robocon.io/">
84-
Robocon talks
62+
<div
63+
v-for="item in $tm('footer.instructions.items')"
64+
:key="item.title">
65+
<a :href="item.href" target="_blank">
66+
{{ item.title }}
8567
</a>
8668
</div>
8769
</div>
8870
<div class="col-sm-6 col-md-3 flex flex-col between">
89-
<div />
90-
<!-- <div class="relative">
71+
<div class="relative">
9172
<button
9273
class="flex middle border-thin p-2xsmall pl-xsmall pr-xsmall"
9374
:class="langDropdownOpen ? 'border-theme' : 'border-white'"
@@ -98,7 +79,7 @@
9879
<div
9980
class="relative ml-2xsmall"
10081
:class="langDropdownOpen ? 'color-theme' : 'color-white'">
101-
Language
82+
{{ langNames.find(({ lang }) => lang === $i18n.locale).name }}
10283
</div>
10384
</button>
10485
<transition name="fade-down">
@@ -118,16 +99,16 @@
11899
</div>
119100
</div>
120101
</transition>
121-
</div> -->
102+
</div>
122103
<div :class="$store.state.isMobile ? 'type-right' : ''">
123104
<div>
124105
<router-link :to="{ name: 'PrivacyPolicy' }">
125-
Privacy Policy
106+
{{ $t('footer.privacyPolicy') }}
126107
</router-link>
127108
</div>
128109
<div>
129110
<router-link :to="{ name: 'CoC' }">
130-
Code of Conduct
111+
{{ $t('footer.coc') }}
131112
</router-link>
132113
</div>
133114
</div>
@@ -138,12 +119,12 @@
138119
</template>
139120

140121
<script>
141-
// import GlobeIcon from './icons/GlobeIcon.vue'
122+
import GlobeIcon from './icons/GlobeIcon.vue'
142123
143124
export default {
144125
name: 'PageFooter',
145126
components: {
146-
// GlobeIcon
127+
GlobeIcon
147128
},
148129
data: () => ({
149130
langDropdownOpen: false

src/components/ResourceBox.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
v-if="!showAll && itemsFilteredByTag.length > 7"
152152
class="stroke type-uppercase mt-small type-small mb-xsmall"
153153
@click="showAll = true">
154-
Show more
154+
{{ $t('resources.showMore') }}
155155
</button>
156156
</div>
157157
</div>

src/content/english.js

+38-7
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ export default () => ({
126126
description: 'Wärtsilä Digital Technologies uses Robot to automate various types of testing. API testing, component testing, functional and system tests are used to ensure the highest quality of a wide variety of software.',
127127
imgName: 'Wartsila.svg'
128128
}
129-
]
129+
],
130+
moreUsers: 'More Users'
130131
},
131132
gettingStarted: {
132133
title: 'Getting Started',
@@ -240,8 +241,10 @@ Welcome Page Should Be Open
240241
openSpace: {
241242
title: 'Open space',
242243
description: 'Meet the Robot Framework developers and foundation members. Join topics created by others or bring your own. Also in Slack #open-space. <a href="./robot-framework-open-space.ics">ICS file</a>'
243-
}
244-
}
244+
},
245+
mailingList: 'Mailing List'
246+
},
247+
coc: 'Code of Conduct'
245248
},
246249
resources: {
247250
title: 'Resources',
@@ -275,10 +278,7 @@ Welcome Page Should Be Open
275278
Most of these tools are developed as separate projects, but some are built into the framework itself.`
276279
}
277280
],
278-
mobileTitles: [
279-
'Standard',
280-
'External'
281-
]
281+
showMore: 'Show More'
282282
},
283283
development: {
284284
title: 'Development',
@@ -298,5 +298,36 @@ Welcome Page Should Be Open
298298
<a href="https://github.com/robotframework/robotframework.github.com/pulls">pull request</a> or an
299299
<a href="https://github.com/robotframework/robotframework.github.com/issues">issue</a>.`
300300
// list of users is found in ./resources/users.js
301+
},
302+
footer: {
303+
contact: 'Contact',
304+
community: 'Community',
305+
instructions: {
306+
title: 'Instructions',
307+
items: [
308+
{
309+
title: 'Installation',
310+
href: 'https://github.com/robotframework/robotframework/blob/master/INSTALL.rst'
311+
}, {
312+
title: 'Quick start',
313+
href: 'https://github.com/robotframework/QuickStartGuide/blob/master/QuickStart.rst'
314+
}, {
315+
title: 'User quide',
316+
href: 'https://robotframework.org/robotframework/#user-guide'
317+
}, {
318+
title: 'Web Demo',
319+
href: 'https://github.com/robotframework/WebDemo'
320+
}, {
321+
title: 'Robocon talks',
322+
href: 'https://robocon.io/'
323+
}
324+
]
325+
},
326+
privacyPolicy: 'Privacy Policy',
327+
coc: 'Code of Conduct'
328+
},
329+
common: {
330+
back: 'Back',
331+
other: 'Other'
301332
}
302333
})

src/views/CoC.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="container narrow mb-xlarge pl-small pr-small">
33
<div class="row mb-large mt-large">
44
<button v-if="cameFromHome" @click="$router.go(-1)" class="color-theme type-underline">
5-
Back
5+
{{ $t('common.back') }}
66
</button>
77
<router-link v-else :to="{ name: 'Home' }">
8-
Back
8+
{{ $t('common.back') }}
99
</router-link>
1010
</div>
1111
<h2>

src/views/Home.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<community-items />
4747
<button class="theme mt-medium" :class="$store.state.isMobile ? 'ml-xsmall' : ''">
4848
<router-link :to="{ name: 'CoC' }" class="type-no-underline">
49-
Code of Conduct
49+
{{ $t('community.coc') }}
5050
</router-link>
5151
</button>
5252
</div>
@@ -105,7 +105,7 @@ export default {
105105
</script>
106106

107107
<style scoped>
108-
@media screen and (max-width: 768px) {
108+
@media screen and (max-width: 950px) {
109109
.nav-desktop {
110110
display: none;
111111
}

src/views/Users.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="container mb-xlarge p-small">
33
<div class="row mb-large mt-large">
44
<button v-if="cameFromHome" @click="$router.go(-1)" class="color-theme type-underline">
5-
Back
5+
{{ $t('common.back') }}
66
</button>
77
<router-link v-else :to="{ name: 'Home' }">
8-
Back
8+
{{ $t('common.back') }}
99
</router-link>
1010
</div>
1111
<h2>

0 commit comments

Comments
 (0)