diff --git a/.localeapp/config.rb b/.localeapp/config.rb deleted file mode 100644 index bfd9ca7d..00000000 --- a/.localeapp/config.rb +++ /dev/null @@ -1,6 +0,0 @@ -Localeapp.configure do |config| - config.api_key = ENV['LOCALEAPP_API_KEY'] - config.translation_data_directory = 'locales' - config.synchronization_data_file = '.localeapp/log.yml' - config.daemon_pid_file = '.localeapp/localeapp.pid' -end diff --git a/.localeapp/log.yml b/.localeapp/log.yml deleted file mode 100644 index ea6770fd..00000000 --- a/.localeapp/log.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -:polled_at: 1363093348 -:updated_at: 1363093348 diff --git a/Assetfile b/Assetfile index 8c867331..5e4925bb 100644 --- a/Assetfile +++ b/Assetfile @@ -1,7 +1,6 @@ $: << 'lib' require 'rake-pipeline-web-filters' -require 'rake-pipeline-i18n-filters' require 'travis/assets' require 'compass' @@ -12,13 +11,6 @@ assets ||= Travis::Assets.new assets.setup_compass assets.update_version -output 'assets/scripts/config' -input 'locales' do - match '**/*.yml' do - i18n_js { 'locales.js' } - end -end - output 'public/scripts' input assets.scripts do match '**/*.hbs' do diff --git a/Gemfile b/Gemfile index a7922e0b..ca75444c 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,6 @@ gem 'sinatra' group :assets do gem 'rake-pipeline', github: 'livingsocial/rake-pipeline' gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters' - gem 'rake-pipeline-i18n-filters' gem 'coffee-script' gem 'compass' gem 'tilt' @@ -22,8 +21,6 @@ end group :development, :test do gem 'rake' - gem 'localeapp' - gem 'localeapp-handlebars_i18n' end diff --git a/Gemfile.lock b/Gemfile.lock index 80adb3af..0ee3859c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,28 +40,17 @@ GEM foreman (0.61.0) thor (>= 0.13.6) fssm (0.2.10) - gli (2.5.4) guard (1.6.2) listen (>= 0.6.0) lumberjack (>= 1.0.2) pry (>= 0.9.10) terminal-table (>= 1.4.3) thor (>= 0.14.6) - i18n (0.6.3) json (1.7.7) libv8 (3.16.14.3) listen (0.7.3) - localeapp (0.6.9) - gli - i18n - json - rest-client - ya2yaml - localeapp-handlebars_i18n (0.0.1) - localeapp lumberjack (1.0.2) method_source (0.8.1) - mime-types (1.21) multi_json (1.6.1) open4 (1.3.0) pry (0.9.12) @@ -82,13 +71,9 @@ GEM rack-test (0.6.2) rack (>= 1.0) rake (10.0.3) - rake-pipeline-i18n-filters (0.0.5) - rake-pipeline (~> 0.6) rb-fsevent (0.9.3) rerun (0.8.0) listen - rest-client (1.6.7) - mime-types (>= 1.16) rspec (2.13.0) rspec-core (~> 2.13.0) rspec-expectations (~> 2.13.0) @@ -116,7 +101,6 @@ GEM uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) - ya2yaml (0.31) yui-compressor (0.9.6) POpen4 (>= 0.1.4) @@ -129,8 +113,6 @@ DEPENDENCIES foreman guard libv8 (~> 3.16.0) - localeapp - localeapp-handlebars_i18n puma rack-cache rack-mobile-detect @@ -138,7 +120,6 @@ DEPENDENCIES rack-ssl (~> 1.3) rake rake-pipeline! - rake-pipeline-i18n-filters rake-pipeline-web-filters! rb-fsevent (~> 0.9.1) rerun diff --git a/assets/scripts/app/app.coffee b/assets/scripts/app/app.coffee index 4e16be6f..2f8e01ed 100644 --- a/assets/scripts/app/app.coffee +++ b/assets/scripts/app/app.coffee @@ -145,17 +145,8 @@ unless window.TravisApplication $('#repo').append(element) Em.run.later (-> element.remove()), 10 - setLocale: (locale) -> - return unless locale - I18n.locale = locale - Travis.set('locale', locale) - - defaultLocale: 'en' - ready: -> location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!' - I18n.fallbacks = true - @setLocale 'locale', @get('defaultLocale') currentDate: -> new Date() diff --git a/assets/scripts/app/auth.coffee b/assets/scripts/app/auth.coffee index 565a18c1..40a47c79 100644 --- a/assets/scripts/app/auth.coffee +++ b/assets/scripts/app/auth.coffee @@ -6,11 +6,9 @@ window.addEventListener('message', (e) => @receiveMessage(e)) signOut: -> - Travis.storage.removeItem('travis.locale') Travis.storage.removeItem('travis.user') Travis.storage.removeItem('travis.token') Travis.sessionStorage.clear() - Travis.setLocale Travis.default_locale @set('state', 'signed-out') @set('user', undefined) if user = Travis.__container__.lookup('controller:currentUser').get('content') @@ -67,7 +65,6 @@ Travis.__container__.lookup('controller:currentUser').set('content', user) @set('state', 'signed-in') - Travis.setLocale(data.user.locale || Travis.default_locale) Travis.trigger('user:signed_in', data.user) if router = Travis.__container__.lookup('router:main') Ember.run.next => diff --git a/assets/scripts/app/controllers/current_user.coffee b/assets/scripts/app/controllers/current_user.coffee index c8226503..7a29ca81 100644 --- a/assets/scripts/app/controllers/current_user.coffee +++ b/assets/scripts/app/controllers/current_user.coffee @@ -12,6 +12,4 @@ Travis.CurrentUserController = Em.ObjectController.extend if (user = @get('content')) && user.get('isSyncing') && !user.get('syncedAt') Ember.run.scheduleOnce 'routerTransitions', this, -> @container.lookup('router:main').send('renderFirstSync') - ).observes('isSyncing', 'content') - - updateLocale: delegate('updateLocale', to: 'content') + ).observes('isSyncing', 'content') \ No newline at end of file diff --git a/assets/scripts/app/helpers.coffee b/assets/scripts/app/helpers.coffee index ac77424a..bcbd98c1 100644 --- a/assets/scripts/app/helpers.coffee +++ b/assets/scripts/app/helpers.coffee @@ -1,4 +1,3 @@ require 'helpers/handlebars' require 'helpers/helpers' require 'helpers/urls' -require 'helpers/i18n_handlebars' diff --git a/assets/scripts/app/helpers/i18n_handlebars.coffee b/assets/scripts/app/helpers/i18n_handlebars.coffee deleted file mode 100644 index 38e6bfbc..00000000 --- a/assets/scripts/app/helpers/i18n_handlebars.coffee +++ /dev/null @@ -1,34 +0,0 @@ -I18nBoundView = Ember.View.extend Ember._Metamorph, { - - key: null, - - valueDidChange: -> - return if this.morph.isRemoved() - this.morph.html(this.valueForRender()) - - valueForRender: -> - new Handlebars.SafeString I18n.t(this.key) - - init: -> - this._super() - Travis.addObserver('locale', this, 'valueDidChange') - - didInsertElement: -> - this.valueDidChange() - - destroy: -> - Travis.removeObserver('locale', this, 'valueDidChange') - this._super() - - render: (buffer) -> - buffer.push(this.valueForRender()) -} - -Ember.Handlebars.registerHelper 't', (key, options) -> - view = options.data.view - bindView = view.createChildView(I18nBoundView, { key: key }) - view.appendChild(bindView) - # dont write any content from this helper, let the child view - # take care of itself. - false - diff --git a/assets/scripts/app/models/build.coffee b/assets/scripts/app/models/build.coffee index 667daee9..86d3b55c 100644 --- a/assets/scripts/app/models/build.coffee +++ b/assets/scripts/app/models/build.coffee @@ -56,7 +56,7 @@ require 'travis/model' configKeys: (-> keys = @get('rawConfigKeys') - headers = (I18n.t(key) for key in ['build.job', 'build.duration', 'build.finished_at']) + headers = ['Job', 'Duration', 'Finished'] $.map(headers.concat(keys), (key) -> if Travis.CONFIG_KEYS_MAP.hasOwnProperty(key) then Travis.CONFIG_KEYS_MAP[key] else key) ).property('rawConfigKeys.length') diff --git a/assets/scripts/app/models/user.coffee b/assets/scripts/app/models/user.coffee index 553b26bc..8f57f53f 100644 --- a/assets/scripts/app/models/user.coffee +++ b/assets/scripts/app/models/user.coffee @@ -6,7 +6,6 @@ require 'travis/model' email: Ember.attr('string') login: Ember.attr('string') token: Ember.attr('string') - locale: Ember.attr('string') gravatarId: Ember.attr('string') isSyncing: Ember.attr('boolean') syncedAt: Ember.attr('string') @@ -59,10 +58,6 @@ require 'travis/model' permissions ).property() - updateLocale: (locale) -> - @save() - Travis.setLocale(locale) - type: (-> 'user' ).property() diff --git a/assets/scripts/app/templates/builds/list.hbs b/assets/scripts/app/templates/builds/list.hbs index 5d73ca69..ea2a408a 100644 --- a/assets/scripts/app/templates/builds/list.hbs +++ b/assets/scripts/app/templates/builds/list.hbs @@ -2,21 +2,21 @@ - - + + {{#if view.isPullRequestsList}} {{/if}} - - + + diff --git a/assets/scripts/app/templates/builds/show.hbs b/assets/scripts/app/templates/builds/show.hbs index 7c3d8f81..d1634271 100644 --- a/assets/scripts/app/templates/builds/show.hbs +++ b/assets/scripts/app/templates/builds/show.hbs @@ -3,7 +3,7 @@ {{else}}
-
{{t builds.name}}
+
Build
{{#if build.id}} @@ -12,40 +12,40 @@ {{/if}} {{/if}}
-
{{t builds.state}}
+
state
{{capitalize build.state}}
-
{{t builds.finished_at}}
+
Finished
{{formatTime build.finishedAt}}
-
{{t builds.duration}}
+
Duration
{{formatDuration build.duration}}
{{#with build}}
-
{{t builds.commit}}
+
Commit
{{formatCommit commit}}
{{#if pullRequest}} -
{{t builds.pull_request}}
+
#{{pullRequestNumber}} {{pullRequestTitle}}
{{else}} {{#if commit.compareUrl}} -
{{t builds.compare}}
+
Compare
{{pathFrom commit.compareUrl}}
{{/if}} {{/if}} {{#if commit.authorName}} -
{{t builds.author}}
+
Author
{{commit.authorName}}
{{/if}} {{#if commit.committerName}} -
{{t builds.committer}}
+
Committer
{{commit.committerName}}
{{/if}}
{{/with}} -
{{t builds.message}}
+
Message
{{formatMessage build.commit.message repoBinding=build.repo}}
diff --git a/assets/scripts/app/templates/jobs/list.hbs b/assets/scripts/app/templates/jobs/list.hbs index 22314a35..046d2981 100644 --- a/assets/scripts/app/templates/jobs/list.hbs +++ b/assets/scripts/app/templates/jobs/list.hbs @@ -2,12 +2,12 @@ {{#if view.required}}
{{t builds.name}}{{t builds.message}}BuildMessage - {{t builds.commit}} + Commit - {{t builds.committer}} + Committer - {{t builds.pr}} + PR {{t builds.duration}}{{t builds.finished_at}}DurationFinished
{{else}}
- {{t jobs.build_matrix}} + Build Matrix
{{/if}} @@ -46,7 +46,7 @@ {{#unless view.required}} {{#with job}}
-
{{t jobs.commit}}
+
Commit
{{formatCommit commit}}
{{#if build.pullRequest}} -
{{t builds.pull_request}}
+
#{{build.pullRequestNumber}} {{build.pullRequestTitle}}
{{else}} {{#if commit.compareUrl}} -
{{t jobs.compare}}
+
Compare
{{pathFrom commit.compareUrl}}
{{/if}} {{/if}} {{#if commit.authorName}} -
{{t jobs.author}}
+
Author
{{commit.authorName}}
{{/if}} {{#if commit.committerName}} -
{{t jobs.committer}}
+
Committer
{{commit.committerName}}
{{/if}}
{{/with}} -
{{t jobs.message}}
+
Message
{{formatMessage job.commit.message repoBinding=job.repo}}
diff --git a/assets/scripts/app/templates/layouts/top.hbs b/assets/scripts/app/templates/layouts/top.hbs index fef5be50..e729f651 100644 --- a/assets/scripts/app/templates/layouts/top.hbs +++ b/assets/scripts/app/templates/layouts/top.hbs @@ -4,24 +4,24 @@
- {{t jobs.allowed_failures}} + Allowed Failures