Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #2 from cozy/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
babolivier committed Oct 20, 2015
2 parents fba15aa + 2594e5a commit e88dd22
Show file tree
Hide file tree
Showing 173 changed files with 13,543 additions and 4,190 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ language: node_js
matrix:
fast_finish: true
allow_failures:
- node_js: "0.11"
- node_js: "0.12"
- node_js: "4"
node_js:
- "0.10"
- "0.11"
- "0.12"
- "4"
services:
- couchdb
env:
Expand Down
9 changes: 9 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[main]
host = https://www.transifex.com

[cozy-home.enjson]
file_filter = client/app/locales/<lang>.json
source_file = client/app/locales/en.json
source_lang = en
type = KEYVALUEJSON

35 changes: 29 additions & 6 deletions Cakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{exec} = require 'child_process'
fs = require 'fs'
logger = require('printit')
date: false
prefix: 'cake'
date: false
prefix: 'cake'

option '-f', '--file [FILE*]' , 'List of test files to run'
option '-d', '--dir [DIR*]' , 'Directory of test files to run'
Expand Down Expand Up @@ -48,7 +48,8 @@ task 'tests', "Run tests #{taskDetails}", (opts) ->
env += " NAME=home TOKEN=token"
logger.info "Running tests with #{env}..."
command = "#{env} mocha " + files.join(" ") + " --reporter spec --colors "
command += "--compilers coffee:coffee-script/register"
command += "--compilers coffee:coffee-script/register "
command += "--timeout 10000 " # longer timeout before test failure
exec command, (err, stdout, stderr) ->
console.log stdout
if err?
Expand All @@ -74,6 +75,18 @@ task "lint", "Run Coffeelint", ->
else
console.log stdout

# convert JSON lang files to JS
buildJsInLocales = ->
path = require 'path'
for file in fs.readdirSync './client/app/locales/'
filename = './client/app/locales/' + file
template = fs.readFileSync filename, 'utf8'
exported = "module.exports = #{template};\n"
name = file.replace '.json', '.js'
fs.writeFileSync "./build/client/app/locales/#{name}", exported
# add locales at the end of app.js
exec "rm -rf build/client/app/locales/*.json"

buildJade = ->
jade = require 'jade'
path = require 'path'
Expand All @@ -91,23 +104,33 @@ task 'build', 'Build CoffeeScript to Javascript', ->
logger.info "Start compilation..."
command = "coffee -cb --output build/server server && " + \
"coffee -cb --output build/ server.coffee && " + \
"coffee -cb --output build/client/app/locales client/app/locales && " + \
"mkdir -p build/client/app/locales/ && " + \
"rm -rf build/client/app/locales/* && " + \
"rm -rf build/client/public && " + \
"cp -rf client/public build/client/public && " + \
"mkdir -p build/client/public/ && " + \
# does not work when brunch is not launched
"cp -rf client/public/* build/client/public && " + \
"mkdir -p build/server/views/"
exec command, (err, stdout, stderr) ->
if err
logger.error "An error has occurred while compiling:\n" + err
process.exit 1
else
buildJade()
buildJsInLocales()
logger.info "Compilation succeeded."
process.exit 0

SVGIMAGES = 'client/app/assets/img/apps'

task 'build-icons', "Sprite the icons in #{SVGIMAGES}", ->
Iconizr = require 'iconizr'
try Iconizr = require 'iconizr'
catch err
return console.log """
iconizr is not compatible with node 4 and therefore not included
in dependencies. You need to run `npm install iconizr` before
using the `build-icons` script.
"""
out = 'client/app/assets/app-icons'
Iconizr.createIconKit SVGIMAGES, out,
render: css: true
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Here are the source for the backgrounds:
by [iconmonstr](http://iconmonstr.com/)
Apps icons by [Elegant Themes](http://www.elegantthemes.com/blog/freebie-of-the-week/beautiful-flat-icons-for-free).

## Contribute with Transifex

Transifex can be used the same way as git. It can push or pull translations. The config file in the .tx repository configure the way Transifex is working : it will get the json files from the client/app/locales repository.
If you want to learn more about how to use this tool, I'll invite you to check [this](http://docs.transifex.com/introduction/) tutorial.

## License

Cozy Home is developed by Cozy Cloud and distributed under the AGPL v3 license.
Expand Down
427 changes: 251 additions & 176 deletions build/client/app/locales/de.js

Large diffs are not rendered by default.

33 changes: 18 additions & 15 deletions build/client/app/locales/en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Generated by CoffeeScript 1.9.3
module.exports = {
"home": "Home",
"apps": "Apps",
Expand Down Expand Up @@ -109,12 +108,12 @@ module.exports = {
"installed": "installed",
"updated": "updated",
"updating": "updating",
"update all": "Update all",
"update all": "Update Stack and applications",
"show home logs": "Show Home Logs",
"show data system logs": "Show Data System Logs",
"show proxy logs": "Show Proxy Logs",
"show logs": "Show Logs",
"update stack": "Update",
"update stack": "Update the platform",
"reboot stack waiting message": "Wait please, rebooting takes several minutes.",
"update stack waiting message": "Wait please, updating takes several minutes.",
"status no device": "No device registered for synchronization.",
Expand Down Expand Up @@ -180,6 +179,7 @@ module.exports = {
"help send message title": "Write directly to the Cozy Team",
"help send message explanation": "To send a message to the Cozy Team, you can use the text field below. You can send us your feedback, report bugs and of course, ask for assistance!",
"help send message action": "Send message to the Cozy Support Team",
"help send logs": "Send server logs to ease debug",
"send message success": "Message successfully sent!",
"send message error": "An error occured while sending your support message. Try to send it via an email client to [email protected]",
"account change password success": "The password was changed successfully.",
Expand Down Expand Up @@ -216,6 +216,8 @@ module.exports = {
"ghost description": "Share your stories with the world with this app based on the Ghost Blogging Platform.",
"leave google description": "An app to import your current data from your Google account.",
"mstsc.js description": "Manage your Windows Desktop remotely through the RDP protocol.",
"hastebin description": "A simple pastebin, a tool to easily share texts.",
"polybios description": "Manage your PGP keys from your browser.",
"reminder title email": "Reminder",
"reminder title email expanded": "Reminder: %{description} - %{date} (%{calendar})",
"reminder message expanded": "Reminder: %{description}\nStart: %{start} (%{timezone})\nEnd: %{end} (%{timezone})\nPlace: %{place}\nDetails: %{details}",
Expand All @@ -224,19 +226,19 @@ module.exports = {
"installation message failure": "%{appName}'s installation failed.",
"update available notification": "A new version of %{appName} is available.",
"stack update available notification": "A new version of the platform is available.",
"app broken title": 'Broken application',
"app broken": 'This application is broken. Can you try install again: ',
"app broken title": "Broken application",
"app broken": "This application is broken. Can you try install again: ",
"reinstall broken app": "reinstall it.",
"error git": "We can't retrieve source code.",
"error github repo": 'Application repository seems unavailable.',
"error github": 'Github seems unavailable. You can check its status on https://status.github.com/.',
'error npm': "We can't installed application dependencies.",
'error user linux': "We can't create specific linux user for this application.",
'error start': "Application can't start. You can find more details in log application.",
"app msg": 'If error persists, you can contact us at [email protected]' + 'or on IRC #cozycloud on irc.freenode.net.',
'more details': "More details",
'noapps': {
'customize your cozy': "You can also <a href=\"%{account}\">go to your settings</a> and customize your Cozy,\nor <a href=\"%{appstore}\">take a look at the App Store</a> to install your first app."
"error github repo": "Application repository seems unavailable.",
"error github": "Github seems unavailable. You can check its status on https://status.github.com/.",
"error npm": "We can't installed application dependencies.",
"error user linux": "We can't create specific linux user for this application.",
"error start": "Application can't start. You can find more details in log application.",
"app msg": "If error persists, you can contact us at [email protected]' + 'or on IRC #cozycloud on irc.freenode.net.",
"more details": "More details",
"noapps": {
"customize your cozy": "You can also <a href=\"%{account}\">go to your settings</a> and customize your Cozy,\nor <a href=\"%{appstore}\">take a look at the App Store</a> to install your first app."
},
"pick from files": "Pick a photo",
"Crop the photo": "Crop image",
Expand All @@ -249,4 +251,5 @@ module.exports = {
"drop a file": "Drag & drop a file",
"url of an image": "URL of an image on the web",
"you have no album": "<p>Vous n'avez pas encore d'album photo <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:-(</p>\n<p>Créez en à partir de\n <a href=\"/#applications\" target='_blank'>l'application Photo</a>\n <br>\n et utilisez les photo de votre téléphone via\n <a href='https://play.google.com/store/apps/details?id=io.cozy.files_client&hl=en' target='_blank'>l'app mobile !</a></p>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:-)"
};
}
;
Loading

0 comments on commit e88dd22

Please sign in to comment.