Skip to content

Commit

Permalink
i18n: closes nate-strauser#35, maybe also nate-strauser#45. (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisbontje committed Mar 6, 2015
1 parent 7726e0d commit e793068
Show file tree
Hide file tree
Showing 29 changed files with 169 additions and 78 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ email
gadicohen:sitemaps
natestrauser:uploadcare-plus
reactive-var
tap:i18n
2 changes: 2 additions & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ blaze@2.0.4
blaze-tools@1.0.2
boilerplate-generator@1.0.2
callback-hook@1.0.2
cfs:http-methods@0.0.27
check@1.0.4
coffeescript@1.0.5
datariot:ganalytics@0.2.1
Expand Down Expand Up @@ -116,6 +117,7 @@ spiderable@1.0.6
srp@1.0.2
stylus@1.0.6
summernote:standalone@0.6.0_1
tap:i18n@1.4.1
templating@1.0.11
tmeasday:publish-counts@0.3.4
tracker@1.0.5
Expand Down
11 changes: 6 additions & 5 deletions client/views/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="jumbotron container-fluid">
<div class="container text-center">
<div class="row">
<h1>We Work Meteor</h1>
<h1>{{ _"wework_name"}}</h1>
</div>
<div class="row">
<br>
Expand All @@ -17,15 +17,16 @@ <h1>We Work Meteor</h1>
</div>
<div class="row">
<p>
The premier job board and developer community space specifically for <a href="http://www.meteor.com/">Meteor</a>.
{{{_ "wework_subtitle"}}}
<br><br>
<!-- TODO i18n -->
Browse the <a href="{{pathFor 'jobs'}}">{{getPublishedCount 'jobs'}} active job postings</a> or <a href="{{pathFor 'profileNew'}}">create your profile</a> to join the <a href="{{pathFor 'profiles'}}">{{getPublishedCount 'developers'}} registered developers</a>.
</p>
</div>

<div id="callToAction" class="row">
<a class="col-sm-4 col-sm-offset-1 col-xs-12 text-center btn btn-primary btn-md" role="button" href="{{pathFor 'jobNew'}}">Post A Job</a>
<a class="col-sm-4 col-sm-offset-2 col-xs-12 text-center btn btn-success btn-md" role="button" href="{{pathFor 'profileNew'}}">Create a Profile</a>
<a class="col-sm-4 col-sm-offset-1 col-xs-12 text-center btn btn-primary btn-md" role="button" href="{{pathFor 'jobNew'}}">{{_ "post_job"}}</a>
<a class="col-sm-4 col-sm-offset-2 col-xs-12 text-center btn btn-success btn-md" role="button" href="{{pathFor 'profileNew'}}">{{_ "create_profile"}}</a>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions client/views/includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
<div class="row">
<div class="col-xs-12 text-center">
<small>
Made By <a href="http://www.natestrauser.com" target="_blank">Nate Strauser</a>
{{_ "made_by"}} <a href="http://www.natestrauser.com" target="_blank">Nate Strauser</a>
&nbsp;-&nbsp;
<i class="fa fa-github fa-lg"></i>&nbsp;&nbsp;<a href="https://github.com/nate-strauser/wework" target="_blank">Fork me on GitHub</a>
<i class="fa fa-github fa-lg"></i>&nbsp;&nbsp;<a href="https://github.com/nate-strauser/wework" target="_blank">{{_ "fork_me_on_github"}}</a>
</small>
</div>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<br>
<small>
<i class="fa fa-rss"></i> RSS <a href="/rss/jobs" target="_blank">Jobs</a> <a href="/rss/profiles" target="_blank">Developers</a>
<i class="fa fa-rss"></i> {{_ "rss"}} <a href="/rss/jobs" target="_blank">{{_ "jobs"}}</a> <a href="/rss/profiles" target="_blank">{{_ "profiles"}}</a>
&nbsp;-&nbsp;
<i class="fa fa-code"></i> JSON <a href="/api/jobs" target="_blank">Jobs</a> <a href="/api/profiles" target="_blank">Developers</a>
<i class="fa fa-code"></i> {{_ "json"}} <a href="/api/jobs" target="_blank">{{_ "jobs"}}</a> <a href="/api/profiles" target="_blank">{{_ "profiles"}}</a>
</small>
<br>
</div>
</div>
<div class="row">
<div class="col-xs-12 text-center" id="disclaimer">
We Work Meteor is an independent entity and has not been authorized, sponsored, or otherwise approved by <a href="http://www.meteor.com/">Meteor Development Group</a>.
{{_ "wework_disclaimer"}}
</div>
</div>
</footer>
Expand Down
30 changes: 15 additions & 15 deletions client/views/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="sr-only">{{_ "toggle_navigation"}}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">We Work Meteor</a>
<a class="navbar-brand" href="/">{{ _"wework_name"}}</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="{{isActiveRoute regex='^jobs$'}}"><a href="{{pathFor 'jobs'}}">Jobs</a></li>
<li class="{{isActiveRoute regex='profiles'}}"><a href="{{pathFor 'profiles'}}">Developers</a></li>
<li class="{{isActiveRoute regex='^jobs$'}}"><a href="{{pathFor 'jobs'}}">{{_ "jobs"}}</a></li>
<li class="{{isActiveRoute regex='profiles'}}"><a href="{{pathFor 'profiles'}}">{{_ "profiles"}}</a></li>
{{#if currentUser}}
<li class="{{isActiveRoute regex='jobNew'}}"><a href="{{pathFor 'jobNew'}}">Post a Job</a></li>
<li class="{{isActiveRoute regex='jobNew'}}"><a href="{{pathFor 'jobNew'}}">{{_ "post_job"}}</a></li>
{{#unless currentUser.isDeveloper}}
<li class="{{isActiveRoute regex='^profile$'}}">
<a href="{{pathFor 'profileNew'}}">Create Developer Profile</a>
<a href="{{pathFor 'profileNew'}}">{{_ "header_create_profile"}}</a>
</li>
{{/unless}}
{{/if}}

</ul>
<ul class="nav navbar-nav navbar-right">
{{#if currentUser}}
Expand All @@ -37,32 +37,32 @@
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{pathFor 'myJobs'}}"><i class="fa fa-building fa-fw"></i> My Posted Jobs</a>
<a href="{{pathFor 'myJobs'}}"><i class="fa fa-building fa-fw"></i> {{_ "my_posted_jobs"}}</a>
</li>
<li class="divider"></li>
{{#if isInRole 'admin'}}
<li><a href="/admin"><i class="fa fa-cogs fa-fw"></i> Admin</a></li>
<li><a href="/admin"><i class="fa fa-cogs fa-fw"></i> {{_ "admin"}}</a></li>
<li class="divider"></li>
{{/if}}
{{#if currentUser.isDeveloper}}
<li>
{{#with profile}}<a href="{{pathFor 'profile'}}"><i class="fa fa-rocket fa-fw"></i> Developer Profile</a>{{/with}}
{{#with profile}}<a href="{{pathFor 'profile'}}"><i class="fa fa-rocket fa-fw"></i> {{_ "header_profile"}}</a>{{/with}}
</li>
{{else}}
<li>
<a href="{{pathFor 'profileNew'}}"><i class="fa fa-rocket fa-fw"></i> Create Developer Profile</a>
<a href="{{pathFor 'profileNew'}}"><i class="fa fa-rocket fa-fw"></i> {{_ "header_create_profile"}}</a>
</li>
{{/if}}
<li>
<a href="#" id="userProfile"><i class="fa fa-user fa-fw"></i> User Profile</a>
<a href="#" id="userProfile"><i class="fa fa-user fa-fw"></i> {{_ "user_profile"}}</a>
</li>
<li class="divider"></li>
<li><a href="#" id="signOut"><i class="fa fa-sign-out fa-fw"></i> Sign Out</a></li>
<li><a href="#" id="signOut"><i class="fa fa-sign-out fa-fw"></i> {{_ "sign_out"}}</a></li>
</ul>
</li>
{{else}}
<li class="{{isActiveRoute regex='signIn'}}"><a href="{{pathFor 'signIn'}}">Log In</a></li>
<li class="{{isActiveRoute regex='signUp'}}"><a href="{{pathFor 'signUp'}}">Sign Up</a></li>
<li class="{{isActiveRoute regex='signIn'}}"><a href="{{pathFor 'signIn'}}">{{_ "log_in"}}</a></li>
<li class="{{isActiveRoute regex='signUp'}}"><a href="{{pathFor 'signUp'}}">{{_ "sign_up"}}</a></li>
{{/if}}
</ul>
</div><!-- /.navbar-collapse -->
Expand Down
2 changes: 1 addition & 1 deletion client/views/includes/loading.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<br>
<br>
<br>
<i class="fa fa-spinner fa-pulse"></i>&nbsp;Loading....
<i class="fa fa-spinner fa-pulse"></i>&nbsp;{{_ "loading"}}
</div>
</div>
</template>
4 changes: 2 additions & 2 deletions client/views/includes/notFound.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<div class="col-sm-8 col-sm-offset-2 text-center">
<div class="alert alert-danger">
<i class="fa fa-frown-o fa-3x pull-left"></i>
<b>Oops, we couldn't find the item that belongs to this url.</b>
<b>{{_ "not_found_title"}}</b>
<br>
<br>
It may have been deleted by the owner or removed by admins.
{{_ "not_found_reason"}}
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions client/views/jobs/job.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="panel-body">
{{>jobExpiredAlert}}
{{#if isInRole 'admin'}}
{{>jobStatusToggle}}
{{>jobStatusToggle}}
{{/if}}
{{>jobStatusAlert}}
<div class="row">
Expand Down Expand Up @@ -47,7 +47,7 @@ <h2>
<i class="fa fa-envelope"></i> {{contact}}
<hr>
{{/if}}
<i class="fa fa-calendar"></i> Posted on {{formatDate createdAt}}
<i class="fa fa-calendar"></i> {{_ "posted_on"}} {{formatDate createdAt}}
</div>
<div class="col-sm-9">
{{#if htmlDescription}}
Expand All @@ -60,11 +60,11 @@ <h2>
{{#if $eq userId $.Meteor.userId}}
<div class="pull-right">
&nbsp;
<a href="{{pathFor 'jobEdit'}}" class="btn btn-primary"><i class="fa fa-pencil"></i> Edit</a>
<a href="{{pathFor 'jobEdit'}}" class="btn btn-primary"><i class="fa fa-pencil"></i> {{_ "edit"}}</a>
</div>
<div class="pull-right">
{{#quickRemoveButton collection="Jobs" _id=_id class="btn btn-danger" beforeRemove=beforeRemove}}
<i class="fa fa-trash-o"></i> Delete
<i class="fa fa-trash-o"></i> {{_ "delete"}}
{{/quickRemoveButton}}
</div>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion client/views/jobs/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Template.job.helpers({
beforeRemove: function() {
return function(collection, id) {
var doc = collection.findOne(id);
if (confirm('Really delete "' + doc.title + '"?')) {
if (confirm(TAPi18n.__("confirm_deletion", doc.title))) {
this.remove();
GAnalytics.event("job", "remove", getUserName(Meteor.user()));
Router.go('myJobs');
Expand Down
13 changes: 7 additions & 6 deletions client/views/jobs/jobForms.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<div class="col-sm-10 col-sm-offset-1">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Post New Job</h4>
<h4>{{_ "post_new_job"}}</h4>
</div>
<div class="panel-body">
<div class="alert alert-info">
<i class="fa fa-exclamation-triangle fa-2x pull-left"></i> This job board is specifically for jobs using <a href="http://www.meteor.com/">Meteor</a>. Please do not post unrelated jobs here.
<i class="fa fa-exclamation-triangle fa-2x pull-left"></i> {{{_ "wework_warning"}}}
</div>
{{#autoForm id="jobNew" collection="Jobs" type="insert"}}
{{>jobFields}}
<div>
<button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o"></i> Post</button>
<button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o"></i> {{_ "post"}}</button>
</div>
{{/autoForm}}
</div>
Expand All @@ -26,14 +26,14 @@ <h4>Post New Job</h4>
<div class="col-sm-10 col-sm-offset-1">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Edit Job Post</h4>
<h4>{{_ "edit_job_post"}}</h4>
</div>
<div class="panel-body">
{{#autoForm id="jobEdit" collection="Jobs" doc=job type="update"}}
{{>jobFields}}
<div>
<button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o"></i> Update</button>
<button id="cancel" class="btn btn-default"> Cancel</button>
<button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o"></i> {{_ "update"}}</button>
<button id="cancel" class="btn btn-default"> {{_ "cancel"}}</button>
</div>
{{/autoForm}}
</div>
Expand All @@ -43,6 +43,7 @@ <h4>Edit Job Post</h4>
</template>

<template name="jobFields">
<!-- TODO i18n -->
{{> afQuickField name='title' placeholder="Title displayed for your listing"}}
{{> afQuickField name='company' placeholder="Name of the hiring company"}}
{{> afQuickField name='location' placeholder="Where is this job located?"}}
Expand Down
10 changes: 5 additions & 5 deletions client/views/jobs/jobIncludes.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="jobLabels">
{{#if remote}}<span class="label label-success"><i class="fa fa-globe"></i> Remote</span>{{/if}}
{{#if remote}}<span class="label label-success"><i class="fa fa-globe"></i> {{_ "remote"}}</span>{{/if}}
{{#if jobtype}}<span class="label label-default"><i class="fa fa-clock-o"></i> {{jobtype}}</span>{{/if}}
</template>

Expand All @@ -8,7 +8,7 @@
<div class="row">
<div class="col-xs-10 col-xs-offset-1 alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Uh oh!</strong> This job post expired. <a href="{{pathFor 'jobEdit'}}">Update now to keep it in the public Jobs list.</a>
<strong>{{_ "uh_oh"}}</strong> {{_ "job_post_expired"}} <a href="{{pathFor 'jobEdit'}}">{{_ "update_now"}}</a>
</div>
</div>
{{/if}}
Expand All @@ -17,7 +17,7 @@
<template name="jobStatusToggle">
<div class="row">
<div class="col-sm-12">
Current Status is <b>{{status}}</b> - Set status to
{{_ "current_status_is"}} <b>{{status}}</b> - {{_ "set_status_to"}}
{{#each statuses}}
{{#unless $eq ../status this}}
<button type="button" class="set-status">{{this}}</button>
Expand All @@ -31,12 +31,12 @@
<template name="jobStatusAlert">
{{#if $eq status 'pending'}}
<div class="alert alert-warning">
<i class="fa fa-exclamation-triangle fa-2x pull-left"></i> This post is still pending admin approval. It will be reviewed shortly and then become live on the site.
<i class="fa fa-exclamation-triangle fa-2x pull-left"></i> {{_ "status_pending_description"}}
</div>
{{else}}
{{#if $eq status 'flagged'}}
<div class="alert alert-danger">
<i class="fa fa-flag fa-2x pull-left"></i> This post has been flagged for content. Contact an admin if you believe this is in error.
<i class="fa fa-flag fa-2x pull-left"></i> {{_ "status_flagged_description"}}
</div>
{{/if}}
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion client/views/jobs/jobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</div>
</div>
{{else}}
No Current Jobs
{{_ "no_current_jobs"}}
{{/each}}
</template>
5 changes: 3 additions & 2 deletions client/views/jobs/jobsRecent.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<section id="jobsRecent">
<div class="row">
<div class="col-sm-4">
<h2>Recent Jobs</h2>
<h2>{{_ "recent_jobs"}}</h2>
</div>
<div class="col-sm-4 text-center">
Last post about {{timeFromLastJob}}
{{_ "last_post_about" timeFromLastJob}}
</div>
<div class="col-sm-4 text-right">
<a href="/rss/jobs" target="_blank"><i class="fa fa-rss fa-2x"></i></a>
Expand All @@ -20,6 +20,7 @@ <h2>Recent Jobs</h2>
{{/each}}
<div class="panel panel-default">
<div class="panel-body text-center">
<!-- TODO i18n -->
<h4><a href="{{pathFor 'jobs'}}">View All {{getPublishedCount 'jobs'}} Jobs&nbsp;&nbsp;<i class="fa fa-arrow-right"></i></a></h4>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions client/views/jobs/myJobs.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template name="myJobs">
<h3>My Posted Jobs</h3>
<h3>{{_ "my_posted_jobs"}}</h3>
{{#each jobs}}
<div class="panel panel-default">
<div class="panel-body">
{{>jobSmall}}
</div>
</div>
{{else}}
You haven't posted any jobs. <a href="{{pathFor 'jobNew'}}">Post a Job</a> if you have one to offer.
<!-- TODO i18n -->
{{_ "you_havent_posted_any_jobs"}} <a href="{{pathFor 'jobNew'}}">Post a Job</a> if you have one to offer.
{{/each}}
</template>
Loading

0 comments on commit e793068

Please sign in to comment.