From 063a583ad37c78db2d93f7dec0f53dd8163ae5dc Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 24 Mar 2014 17:18:58 +0000 Subject: [PATCH 1/6] got basic i18n working in express --- services/web/app.coffee | 1 + services/web/app/coffee/infrastructure/ExpressLocals.coffee | 4 ++++ services/web/app/coffee/infrastructure/Server.coffee | 3 +++ services/web/package.json | 5 +++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/services/web/app.coffee b/services/web/app.coffee index 74605fc27e..600d65c186 100644 --- a/services/web/app.coffee +++ b/services/web/app.coffee @@ -7,6 +7,7 @@ Server = require("./app/js/infrastructure/Server") BackgroundTasks = require("./app/js/infrastructure/BackgroundTasks") Errors = require "./app/js/errors" + argv = require("optimist") .options("user", {alias : "u", description : "Run the server with permissions of the specified user"}) .options("group", {alias : "g", description : "Run the server with permissions of the specified group"}) diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index 053a6f0dac..1e8476f363 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -48,6 +48,10 @@ module.exports = (app)-> res.locals.settings = Settings next() + app.use (req, res, next)-> + res.locals.translate = req.i18n.translate + next() + app.use (req, res, next)-> res.locals.getSiteHost = -> Settings.siteUrl.substring(Settings.siteUrl.indexOf("//")+2) diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index 2c0866c051..52bd179945 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -15,6 +15,8 @@ sessionStore = new RedisStore(host:Settings.redis.web.host, port:Settings.redis. cookieParser = express.cookieParser(Settings.security.sessionSecret) oneDayInMilliseconds = 86400000 ReferalConnect = require('../Features/Referal/ReferalConnect') +i18n = require("i18next") +i18n.init(resGetPath: 'locales/__lng__/__ns__.json') Monitor = require "./Monitor" @@ -40,6 +42,7 @@ app.configure ()-> app.set 'views', __dirname + '/../../views' app.set 'view engine', 'jade' app.use express.bodyParser(uploadDir: __dirname + "/../../../data/uploads") + app.use i18n.handle app.use cookieParser app.use express.session proxy: true diff --git a/services/web/package.json b/services/web/package.json index 4d08ecc1f2..872b17952b 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -32,12 +32,13 @@ "fairy": "0.0.2", "node-uuid": "1.4.0", "mongojs": "0.9.8", - "nodemailer": "0.6.1", + "nodemailer": "0.6.1", "bcrypt": "0.7.5", "archiver": "0.5.1", "nodetime": "0.8.15", "mocha": "1.17.1", - "redback": "0.3.7" + "redback": "0.3.7", + "i18next": "~1.7.1" }, "devDependencies": { "chai": "", From a86e95c7110604a357c65461d2c8662e15cd38cb Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 24 Mar 2014 19:30:47 +0000 Subject: [PATCH 2/6] added bulk of translations in with qqq info about them all --- .../app/coffee/infrastructure/Server.coffee | 2 +- services/web/locales/de.json | 3 + services/web/locales/en-US.json | 147 ++++++++++++++++++ services/web/locales/qqq.json | 142 +++++++++++++++++ 4 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 services/web/locales/de.json create mode 100644 services/web/locales/en-US.json create mode 100644 services/web/locales/qqq.json diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index 52bd179945..63373d9cb6 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -16,7 +16,7 @@ cookieParser = express.cookieParser(Settings.security.sessionSecret) oneDayInMilliseconds = 86400000 ReferalConnect = require('../Features/Referal/ReferalConnect') i18n = require("i18next") -i18n.init(resGetPath: 'locales/__lng__/__ns__.json') +i18n.init(resGetPath: 'locales/__lng__.json') Monitor = require "./Monitor" diff --git a/services/web/locales/de.json b/services/web/locales/de.json new file mode 100644 index 0000000000..0adad7e509 --- /dev/null +++ b/services/web/locales/de.json @@ -0,0 +1,3 @@ +{ + "project":"German Project" +} \ No newline at end of file diff --git a/services/web/locales/en-US.json b/services/web/locales/en-US.json new file mode 100644 index 0000000000..0995265f6a --- /dev/null +++ b/services/web/locales/en-US.json @@ -0,0 +1,147 @@ +{ + "projects": "Projects", + "account_settings": "Account Settings", + "search_projects": "Search projects", + "add_tag": "Add Tag", + "tags": "tags", + "actions:":"Actions", + "clone_project":"Clone Project", + "delete_project":"Delete Project", + "download_zip":"Download Zip", + "new_project":"New Project", + "blank_project":"Blank Project", + "example_project":"Example Project", + "upload_zipped_project":"Upload Zipped Project", + "from_template":"From Template", + "cv_or_resume":"CV or Resume", + "cover_letter":"Cover Letter", + "journal_article":"Journal Article", + "presentation":"Presentation", + "thesis":"Thesis", + "bibliographies":"Bibliographies", + + "sharelatex_is_open_source":"ShareLaTeX is open source", + "fork_us_on_github":"Fork us on Github", + + "terms_of_service":"Terms of Service", + "privacy_policy":"Privacy Policy", + "plans_and_pricing":"Plans & Pricing", + "university_licences":"University Licenses", + "security":"Security", + "contact_us":"Contact us", + "thanks":"Thanks", + "blog":"Blog", + "latex_editor":"LaTeX Editor", + + + "get_free_stuff":"Get free stuff", + "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", + + + "chat":"Chat", + "no_one_else_online":"No one else is online", + "your_message":"Your Message", + + + "loading":"Loading", + "loading_editor":"Loading Editor", + "connecting":"Connecting", + "new":"new", + "recompile":"Recompile", + "back_to_pdf":"Back to PDF", + "download":"Download", + "share_privately_via_email":"Share Privately (via email)", + "email":"Email", + "privlages":"Privileges", + "owner":"Owner", + "read_and_write":"Read and Write", + "read_only":"Read Only", + "add_new_collaborator":"Add New Collaborator", + "share_publicly":"Share Publicly", + "share_on_twitter":"Share on Twitter", + "share_on_facebook":"Share on Facebook", + "share_on_google_plus":"Share on Google+", + "share_url":"Share URL", + "publish":"Publish", + "publish_project_as_template":"Publish project as template", + "your_project_currently_published":"Your project is currently published", + "view_in_template_gallery":"View in template gallery", + "latest_version":"Lastest version", + "description":"Description", + "unpublish":"Unpublish", + "re-publish":"Re-Publish", + "problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.", + "working":"Working", + + "hotkeys": "Hot Keys", + "editor_tour":"Editor Tour", + + "saving":"Saving", + + + "cancel":"cancel", + + "project_settings":"Project Settings", + "general":"General", + "project_name":"Project Name", + "root_document":"Root Document", + "spell_check":"Spell check", + "compiler":"Compiler", + "public_access":"Public Access", + "private":"Private", + "public":"Public", + + "export_and_copy":"Export and Copy", + "download_project_as_zip":"Download project as Zip", + + "delete_forever":"Delete Forever", + "confirm_delete_project":"Are you sure you want to delete this project?", + + + "support_and_feedback":"Support and feedback", + "help":"Help", + "latex_templates":"LaTeX Templates", + "info":"Info", + "latex_help_guide":"LaTeX help guide", + "latex_resources":"LaTeX Resources", + + + + "choose_your_plan":"Choose your plan", + "indvidual_plans":"Individual Plans", + "free_forever":"Free forever", + "low_priority_compile":"Low priority compiling", + "unlimited_projects":"Unlimited projects", + "unlimited_compiles":"Unlimited compiles", + "full_history_of_changes":"Full history of changes", + "highest_priority_compiling":"Highest priority compiling", + "dropbox_sync":"Dropbox Sync", + "beta":"Beta", + "google_drive_intergration":"Google Drive integration", + "coming_soon":"coming soon", + "git_access":"Git access", + "sign_up_now":"Sign Up Now", + "multi_team_members":"__count__ team members", + "you_plus_multi_free_users":"You + __count__ free users per project", + "group_plans":"Group Plans", + "annual":"Annual", + "half_price_student":"Half price student plans", + + "about_us":"About Us", + "meet_team_behind_sl":"Meet the team behind your favourite online LaTeX editor", + "about_henry_oswald":"Henry Oswald built an experimental LaTeX editor in 2011 which later became ShareLaTeX. He is a trained software engineer who lives in London. Henry has been responsible for building up a reliable platform for ShareLaTeX that allows instant real-time collaboration. Henry is a strong advocate of Test Driven Development and makes sure we keep the ShareLaTeX code clean and easy to maintain.", + "about_james_allen":"James Allen started working with Henry early in 2012 and finished his PhD in theoretical physics early in 2013. James began working on one of the first online LaTeX editors, ScribTeX, in 2008 and he has played a large role in developing the technologies and concepts that made ScribTeX and now ShareLaTeX possible. James is also slightly too obsessed with typography and learning the internals of how LaTeX works.", + "motivation_behind_sl":"Our first priority with ShareLaTeX is to build a tool which makes life easier for all the LaTeX users out there. The 'thank you's and success stories are a strong motivator for us, and we hope to always be able to offer a fully-functional LaTeX editor which anyone can use for free. \n We also believe that charging money for tools like ShareLaTeX is important since it helps to guarantee the future of the site and the safety of your work, as well as allowing us to focus on it full time to develop new features. We prefer to provide a valuable service at a fair price rather than having to try run the site from adverts, or worse. As our customers, we are answerable to you and only you.", + "technologies":"Technologies", + "about_technology":"We use a lot of exciting technologies to run ShareLaTeX. We have mutliple APIs behind the scenes that we've written in Node.js, but the one exception is our open sourced compiler API. This is written in Ruby on Rails. We generally write in coffee-script as we find it helps to speed up development and make our code more readable. Your data is stored in MongoDB, Redis and Amazon S3. We practice Test Driven Development (TDD) to help produce robust and clean code which is easy to refactor.", + + "attribution":"Attribution", + "thanks_to_open_source_components":"We've only been able to create ShareLaTeX thanks to the many amazing free and open source technologies that exist. Here are some that we have been using and would like to say thank you to:", + "about_nodejs_and_npm":"and the massive set of modules that are available", + "about_pdfjs_list_view":"A wrapper for PDF.js that powers our built in PDF viewer", + "about_bootstrap":"for letting us survive without being designers", + + + + +} \ No newline at end of file diff --git a/services/web/locales/qqq.json b/services/web/locales/qqq.json new file mode 100644 index 0000000000..1f7103de93 --- /dev/null +++ b/services/web/locales/qqq.json @@ -0,0 +1,142 @@ +{ + + "projects": "name for all the projects seen at https://www.sharelatex.com/project", + "account_settings": "seen in left hand menu at https://www.sharelatex.com/project ", + "search_projects": "used for the place holder in the search field at https://www.sharelatex.com/project", + "add_tag": "used for the button to add tags to a project at https://www.sharelatex.com/project", + "tags": "header for all the shown tags on https://www.sharelatex.com/project", + "actions:":"button text used to show different actions that can be done on a project https://www.sharelatex.com/project", + "clone_project":"trigger the cloning/copying of a project https://www.sharelatex.com/project", + "delete_project":"delete a project https://www.sharelatex.com/project", + "download_zip":"download a project as a zip https://www.sharelatex.com/project", + "new_project":"button for new project https://www.sharelatex.com/project", + "blank_project":"create a blank project https://www.sharelatex.com/project", + "example_project":"create an example project https://www.sharelatex.com/project", + "upload_zipped_project":"create a project uploaded from a zip https://www.sharelatex.com/project", + "from_template":"sub heading used for creating a new proejct from a template https://www.sharelatex.com/project", + "cv_or_resume":"CV or Resume section", + "cover_letter":"Cover Letter section", + "journal_article":"Journal Article section", + "presentation":"Presentation section", + "thesis":"Thesis section", + "bibliographies":"Bibliographies section", + + "sharelatex_is_open_source":"announcment that ShareLaTeX is open source", + "fork_us_on_github":"used to link to our github repo", + + "terms_of_service":"Terms of Service", + "privacy_policy":"Privacy Policy", + "plans_and_pricing":"Plans & Pricing", + "university_licences":"University Licenses", + "security":"Security", + "contact_us":"Contact us", + "thanks":"Thanks", + "blog":"Blog", + "latex_editor":"LaTeX Editor", + + + "get_free_stuff":"Get free stuff", + "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", + + + "chat":"Chat", + "no_one_else_online":"message telling people no one is on-line inside the editor", + "your_message":"place holder for the message sending box", + + + "loading":"loading message when entering the editor", + "loading_editor":"loading message when entering the editor", + "connecting":"loading message when entering the editor", + "new":"new", + "recompile":"button to compile the pdf when inside the editor", + "back_to_pdf":"Back to PDF", + "download":"Download", + "share_privately_via_email":"Share Privately (via email)", + "email":"Email", + "privlages":"Privileges", + "owner":"Owner", + "read_and_write":"Read and Write", + "read_only":"Read Only", + "add_new_collaborator":"Add New Collaborator", + "share_publicly":"Share Publicly", + "share_on_twitter":"Share on Twitter", + "share_on_facebook":"Share on Facebook", + "share_on_google_plus":"Share on Google+", + "share_url":"Share URL", + "publish":"Publish", + "publish_project_as_template":"Publish project as template", + "your_project_currently_published":"Your project is currently published", + "view_in_template_gallery":"View in template gallery", + "latest_version":"Latest version", + "description":"Description", + "unpublish":"Unpublish", + "re-publish":"Re-Publish", + "problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.", + "working":"message telling the user that the system is working at the moment", + + "hotkeys": "link to display hot keys", + "editor_tour":"link to start tour", + + "saving":"message that the project is being saved", + + "cancel":"generically used throughout lots of pop ups to cancel the event", + + "project_settings":"Header used at top of project settings", + "general":"header used for general part of project settings", + "project_name":"label used for project name field", + "root_document":"label used for root document dropdown menu", + "spell_check":"label used for selecting the spell check", + "compiler":"label used for selecting compiler", + "public_access":"value for setting a project to have public access", + "private":"value for setting a project to be private", + "public":"value for setting project to be public", + + "export_and_copy":"label for Export and Copying project options", + "download_project_as_zip":"Download project as Zip", + + "delete_forever":"button texts used to confirm that the user wants to delete the project forever (no going back)", + "confirm_delete_project":"message asking the user if they do want to delete the project", + + "support_and_feedback":"header at top of every page for linking to Support and feedback", + "help":"header at top of every page for linking to Help", + "latex_templates":"header at top of every page for linking to LaTeX Templates", + "info":"header at top of every page for linking to Info", + "latex_help_guide":"header at top of every page under the info dropbox linking to LaTeX help guide", + "latex_resources":"header at top of every page under the info dropbox linking to LaTeX Resources", + + "choose_your_plan":"Choose your plan https://www.sharelatex.com/user/subscription/plans ", + "indvidual_plans":"Individual Plans https://www.sharelatex.com/user/subscription/plans", + "free_forever":"Free forever https://www.sharelatex.com/user/subscription/plans", + "low_priority_compile":"Low priority compiling https://www.sharelatex.com/user/subscription/plans", + "unlimited_projects":"Unlimited projects https://www.sharelatex.com/user/subscription/plans", + "unlimited_compiles":"Unlimited compiles https://www.sharelatex.com/user/subscription/plans", + "full_history_of_changes":"Full history of changes https://www.sharelatex.com/user/subscription/plans", + "highest_priority_compiling":"Highest priority compiling https://www.sharelatex.com/user/subscription/plans", + "dropbox_sync":"Dropbox Sync https://www.sharelatex.com/user/subscription/plans", + "beta":"used as a label when a feature is in Beta", + "google_drive_intergration":"Google Drive integration https://www.sharelatex.com/user/subscription/plans", + "coming_soon":"used as a label when a feature is coming soon", + "git_access":"Git access", + "sign_up_now":"Sign Up Now button on https://www.sharelatex.com/user/subscription/plans to sign up now", + "multi_team_members":"__count__ team members https://www.sharelatex.com/user/subscription/plans ", + "you_plus_multi_free_users":"You + __count__ free users per project https://www.sharelatex.com/user/subscription/plans", + "group_plans":"Group Plans https://www.sharelatex.com/user/subscription/plans", + "annual":"Annual used for annual subscriptions", + "half_price_student":"Half price student plans", + + "about_us":"About Us header used for the about us page https://www.sharelatex.com/about", + "meet_team_behind_sl":"opening blurb for about us page https://www.sharelatex.com/about", + "about_henry_oswald":"about Henry - https://www.sharelatex.com/about", + "about_james_allen":"about James - https://www.sharelatex.com/about", + "motivation_behind_sl":"motivation behind ShareLaTeX - https://www.sharelatex.com/about", + "technologies":"header for technologies field", + "about_technology":"paragraph about the technologies we use", + + "attribution":"header for Attribution page - https://www.sharelatex.com/attribution", + "thanks_to_open_source_components":"thanks to open source - https://www.sharelatex.com/attribution", + "about_nodejs_and_npm":"https://www.sharelatex.com/attribution", + "about_pdfjs_list_view":"https://www.sharelatex.com/attribution", + "about_bootstrap":"https://www.sharelatex.com/attribution", + + +} \ No newline at end of file From ea05a6ef5830a376f8efc0f0d10c0767385ae430 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 24 Mar 2014 20:59:54 +0100 Subject: [PATCH 3/6] Tweaks to the i18n file Remove some superfluous newlines and the last comma. --- services/web/locales/en-US.json | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/services/web/locales/en-US.json b/services/web/locales/en-US.json index 0995265f6a..cf66652aad 100644 --- a/services/web/locales/en-US.json +++ b/services/web/locales/en-US.json @@ -33,16 +33,13 @@ "blog":"Blog", "latex_editor":"LaTeX Editor", - "get_free_stuff":"Get free stuff", "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", - "chat":"Chat", "no_one_else_online":"No one else is online", "your_message":"Your Message", - "loading":"Loading", "loading_editor":"Loading Editor", "connecting":"Connecting", @@ -78,7 +75,6 @@ "saving":"Saving", - "cancel":"cancel", "project_settings":"Project Settings", @@ -97,7 +93,6 @@ "delete_forever":"Delete Forever", "confirm_delete_project":"Are you sure you want to delete this project?", - "support_and_feedback":"Support and feedback", "help":"Help", "latex_templates":"LaTeX Templates", @@ -105,8 +100,6 @@ "latex_help_guide":"LaTeX help guide", "latex_resources":"LaTeX Resources", - - "choose_your_plan":"Choose your plan", "indvidual_plans":"Individual Plans", "free_forever":"Free forever", @@ -139,9 +132,5 @@ "thanks_to_open_source_components":"We've only been able to create ShareLaTeX thanks to the many amazing free and open source technologies that exist. Here are some that we have been using and would like to say thank you to:", "about_nodejs_and_npm":"and the massive set of modules that are available", "about_pdfjs_list_view":"A wrapper for PDF.js that powers our built in PDF viewer", - "about_bootstrap":"for letting us survive without being designers", - - - - -} \ No newline at end of file + "about_bootstrap":"for letting us survive without being designers" +} From 4298c862cbe1ba15c21e9f5ee8b980c21524e174 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 25 Mar 2014 12:41:47 +0000 Subject: [PATCH 4/6] remove extra coma from qqq --- services/web/locales/qqq.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/services/web/locales/qqq.json b/services/web/locales/qqq.json index 1f7103de93..d2b28dc42f 100644 --- a/services/web/locales/qqq.json +++ b/services/web/locales/qqq.json @@ -34,16 +34,13 @@ "blog":"Blog", "latex_editor":"LaTeX Editor", - "get_free_stuff":"Get free stuff", "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", - "chat":"Chat", "no_one_else_online":"message telling people no one is on-line inside the editor", "your_message":"place holder for the message sending box", - "loading":"loading message when entering the editor", "loading_editor":"loading message when entering the editor", "connecting":"loading message when entering the editor", @@ -136,7 +133,5 @@ "thanks_to_open_source_components":"thanks to open source - https://www.sharelatex.com/attribution", "about_nodejs_and_npm":"https://www.sharelatex.com/attribution", "about_pdfjs_list_view":"https://www.sharelatex.com/attribution", - "about_bootstrap":"https://www.sharelatex.com/attribution", - - + "about_bootstrap":"https://www.sharelatex.com/attribution" } \ No newline at end of file From ebacf864853c5acfdbe8dcb6e6d4fd4ccec31286 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 26 Mar 2014 16:35:13 +0000 Subject: [PATCH 5/6] changed i18n to use seperate translate module which holds the translations --- .../app/coffee/infrastructure/Server.coffee | 5 +- services/web/app/views/project/list.jade | 2 +- services/web/locales/de.json | 3 - services/web/locales/en-US.json | 136 ----------------- services/web/locales/qqq.json | 137 ------------------ services/web/package.json | 4 +- 6 files changed, 5 insertions(+), 282 deletions(-) delete mode 100644 services/web/locales/de.json delete mode 100644 services/web/locales/en-US.json delete mode 100644 services/web/locales/qqq.json diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index 63373d9cb6..5eba75971c 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -15,8 +15,7 @@ sessionStore = new RedisStore(host:Settings.redis.web.host, port:Settings.redis. cookieParser = express.cookieParser(Settings.security.sessionSecret) oneDayInMilliseconds = 86400000 ReferalConnect = require('../Features/Referal/ReferalConnect') -i18n = require("i18next") -i18n.init(resGetPath: 'locales/__lng__.json') +translations = require "translations" Monitor = require "./Monitor" @@ -42,7 +41,7 @@ app.configure ()-> app.set 'views', __dirname + '/../../views' app.set 'view engine', 'jade' app.use express.bodyParser(uploadDir: __dirname + "/../../../data/uploads") - app.use i18n.handle + app.use translations.expressMiddlewear app.use cookieParser app.use express.session proxy: true diff --git a/services/web/app/views/project/list.jade b/services/web/app/views/project/list.jade index ad16640a03..36badcd928 100644 --- a/services/web/app/views/project/list.jade +++ b/services/web/app/views/project/list.jade @@ -87,7 +87,7 @@ block content a.normalText.menu-indent(href="/templates/thesis") Thesis li a.normalText.menu-indent(href="/templates/bibliographies") Bibliographies - h1 Projects + h1 #{translate("projects")} translate - if (projects.length > 0) .row-fluid .span9 diff --git a/services/web/locales/de.json b/services/web/locales/de.json deleted file mode 100644 index 0adad7e509..0000000000 --- a/services/web/locales/de.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "project":"German Project" -} \ No newline at end of file diff --git a/services/web/locales/en-US.json b/services/web/locales/en-US.json deleted file mode 100644 index cf66652aad..0000000000 --- a/services/web/locales/en-US.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "projects": "Projects", - "account_settings": "Account Settings", - "search_projects": "Search projects", - "add_tag": "Add Tag", - "tags": "tags", - "actions:":"Actions", - "clone_project":"Clone Project", - "delete_project":"Delete Project", - "download_zip":"Download Zip", - "new_project":"New Project", - "blank_project":"Blank Project", - "example_project":"Example Project", - "upload_zipped_project":"Upload Zipped Project", - "from_template":"From Template", - "cv_or_resume":"CV or Resume", - "cover_letter":"Cover Letter", - "journal_article":"Journal Article", - "presentation":"Presentation", - "thesis":"Thesis", - "bibliographies":"Bibliographies", - - "sharelatex_is_open_source":"ShareLaTeX is open source", - "fork_us_on_github":"Fork us on Github", - - "terms_of_service":"Terms of Service", - "privacy_policy":"Privacy Policy", - "plans_and_pricing":"Plans & Pricing", - "university_licences":"University Licenses", - "security":"Security", - "contact_us":"Contact us", - "thanks":"Thanks", - "blog":"Blog", - "latex_editor":"LaTeX Editor", - - "get_free_stuff":"Get free stuff", - "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", - - "chat":"Chat", - "no_one_else_online":"No one else is online", - "your_message":"Your Message", - - "loading":"Loading", - "loading_editor":"Loading Editor", - "connecting":"Connecting", - "new":"new", - "recompile":"Recompile", - "back_to_pdf":"Back to PDF", - "download":"Download", - "share_privately_via_email":"Share Privately (via email)", - "email":"Email", - "privlages":"Privileges", - "owner":"Owner", - "read_and_write":"Read and Write", - "read_only":"Read Only", - "add_new_collaborator":"Add New Collaborator", - "share_publicly":"Share Publicly", - "share_on_twitter":"Share on Twitter", - "share_on_facebook":"Share on Facebook", - "share_on_google_plus":"Share on Google+", - "share_url":"Share URL", - "publish":"Publish", - "publish_project_as_template":"Publish project as template", - "your_project_currently_published":"Your project is currently published", - "view_in_template_gallery":"View in template gallery", - "latest_version":"Lastest version", - "description":"Description", - "unpublish":"Unpublish", - "re-publish":"Re-Publish", - "problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.", - "working":"Working", - - "hotkeys": "Hot Keys", - "editor_tour":"Editor Tour", - - "saving":"Saving", - - "cancel":"cancel", - - "project_settings":"Project Settings", - "general":"General", - "project_name":"Project Name", - "root_document":"Root Document", - "spell_check":"Spell check", - "compiler":"Compiler", - "public_access":"Public Access", - "private":"Private", - "public":"Public", - - "export_and_copy":"Export and Copy", - "download_project_as_zip":"Download project as Zip", - - "delete_forever":"Delete Forever", - "confirm_delete_project":"Are you sure you want to delete this project?", - - "support_and_feedback":"Support and feedback", - "help":"Help", - "latex_templates":"LaTeX Templates", - "info":"Info", - "latex_help_guide":"LaTeX help guide", - "latex_resources":"LaTeX Resources", - - "choose_your_plan":"Choose your plan", - "indvidual_plans":"Individual Plans", - "free_forever":"Free forever", - "low_priority_compile":"Low priority compiling", - "unlimited_projects":"Unlimited projects", - "unlimited_compiles":"Unlimited compiles", - "full_history_of_changes":"Full history of changes", - "highest_priority_compiling":"Highest priority compiling", - "dropbox_sync":"Dropbox Sync", - "beta":"Beta", - "google_drive_intergration":"Google Drive integration", - "coming_soon":"coming soon", - "git_access":"Git access", - "sign_up_now":"Sign Up Now", - "multi_team_members":"__count__ team members", - "you_plus_multi_free_users":"You + __count__ free users per project", - "group_plans":"Group Plans", - "annual":"Annual", - "half_price_student":"Half price student plans", - - "about_us":"About Us", - "meet_team_behind_sl":"Meet the team behind your favourite online LaTeX editor", - "about_henry_oswald":"Henry Oswald built an experimental LaTeX editor in 2011 which later became ShareLaTeX. He is a trained software engineer who lives in London. Henry has been responsible for building up a reliable platform for ShareLaTeX that allows instant real-time collaboration. Henry is a strong advocate of Test Driven Development and makes sure we keep the ShareLaTeX code clean and easy to maintain.", - "about_james_allen":"James Allen started working with Henry early in 2012 and finished his PhD in theoretical physics early in 2013. James began working on one of the first online LaTeX editors, ScribTeX, in 2008 and he has played a large role in developing the technologies and concepts that made ScribTeX and now ShareLaTeX possible. James is also slightly too obsessed with typography and learning the internals of how LaTeX works.", - "motivation_behind_sl":"Our first priority with ShareLaTeX is to build a tool which makes life easier for all the LaTeX users out there. The 'thank you's and success stories are a strong motivator for us, and we hope to always be able to offer a fully-functional LaTeX editor which anyone can use for free. \n We also believe that charging money for tools like ShareLaTeX is important since it helps to guarantee the future of the site and the safety of your work, as well as allowing us to focus on it full time to develop new features. We prefer to provide a valuable service at a fair price rather than having to try run the site from adverts, or worse. As our customers, we are answerable to you and only you.", - "technologies":"Technologies", - "about_technology":"We use a lot of exciting technologies to run ShareLaTeX. We have mutliple APIs behind the scenes that we've written in Node.js, but the one exception is our open sourced compiler API. This is written in Ruby on Rails. We generally write in coffee-script as we find it helps to speed up development and make our code more readable. Your data is stored in MongoDB, Redis and Amazon S3. We practice Test Driven Development (TDD) to help produce robust and clean code which is easy to refactor.", - - "attribution":"Attribution", - "thanks_to_open_source_components":"We've only been able to create ShareLaTeX thanks to the many amazing free and open source technologies that exist. Here are some that we have been using and would like to say thank you to:", - "about_nodejs_and_npm":"and the massive set of modules that are available", - "about_pdfjs_list_view":"A wrapper for PDF.js that powers our built in PDF viewer", - "about_bootstrap":"for letting us survive without being designers" -} diff --git a/services/web/locales/qqq.json b/services/web/locales/qqq.json deleted file mode 100644 index d2b28dc42f..0000000000 --- a/services/web/locales/qqq.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - - "projects": "name for all the projects seen at https://www.sharelatex.com/project", - "account_settings": "seen in left hand menu at https://www.sharelatex.com/project ", - "search_projects": "used for the place holder in the search field at https://www.sharelatex.com/project", - "add_tag": "used for the button to add tags to a project at https://www.sharelatex.com/project", - "tags": "header for all the shown tags on https://www.sharelatex.com/project", - "actions:":"button text used to show different actions that can be done on a project https://www.sharelatex.com/project", - "clone_project":"trigger the cloning/copying of a project https://www.sharelatex.com/project", - "delete_project":"delete a project https://www.sharelatex.com/project", - "download_zip":"download a project as a zip https://www.sharelatex.com/project", - "new_project":"button for new project https://www.sharelatex.com/project", - "blank_project":"create a blank project https://www.sharelatex.com/project", - "example_project":"create an example project https://www.sharelatex.com/project", - "upload_zipped_project":"create a project uploaded from a zip https://www.sharelatex.com/project", - "from_template":"sub heading used for creating a new proejct from a template https://www.sharelatex.com/project", - "cv_or_resume":"CV or Resume section", - "cover_letter":"Cover Letter section", - "journal_article":"Journal Article section", - "presentation":"Presentation section", - "thesis":"Thesis section", - "bibliographies":"Bibliographies section", - - "sharelatex_is_open_source":"announcment that ShareLaTeX is open source", - "fork_us_on_github":"used to link to our github repo", - - "terms_of_service":"Terms of Service", - "privacy_policy":"Privacy Policy", - "plans_and_pricing":"Plans & Pricing", - "university_licences":"University Licenses", - "security":"Security", - "contact_us":"Contact us", - "thanks":"Thanks", - "blog":"Blog", - "latex_editor":"LaTeX Editor", - - "get_free_stuff":"Get free stuff", - "recommend_sl_and_get_free_stuff":"Recommend ShareLaTeX to your friends and we'll upgrade your account for free.", - - "chat":"Chat", - "no_one_else_online":"message telling people no one is on-line inside the editor", - "your_message":"place holder for the message sending box", - - "loading":"loading message when entering the editor", - "loading_editor":"loading message when entering the editor", - "connecting":"loading message when entering the editor", - "new":"new", - "recompile":"button to compile the pdf when inside the editor", - "back_to_pdf":"Back to PDF", - "download":"Download", - "share_privately_via_email":"Share Privately (via email)", - "email":"Email", - "privlages":"Privileges", - "owner":"Owner", - "read_and_write":"Read and Write", - "read_only":"Read Only", - "add_new_collaborator":"Add New Collaborator", - "share_publicly":"Share Publicly", - "share_on_twitter":"Share on Twitter", - "share_on_facebook":"Share on Facebook", - "share_on_google_plus":"Share on Google+", - "share_url":"Share URL", - "publish":"Publish", - "publish_project_as_template":"Publish project as template", - "your_project_currently_published":"Your project is currently published", - "view_in_template_gallery":"View in template gallery", - "latest_version":"Latest version", - "description":"Description", - "unpublish":"Unpublish", - "re-publish":"Re-Publish", - "problem_publishing":"There is a problem with our publishing service, please try again in a few minutes.", - "working":"message telling the user that the system is working at the moment", - - "hotkeys": "link to display hot keys", - "editor_tour":"link to start tour", - - "saving":"message that the project is being saved", - - "cancel":"generically used throughout lots of pop ups to cancel the event", - - "project_settings":"Header used at top of project settings", - "general":"header used for general part of project settings", - "project_name":"label used for project name field", - "root_document":"label used for root document dropdown menu", - "spell_check":"label used for selecting the spell check", - "compiler":"label used for selecting compiler", - "public_access":"value for setting a project to have public access", - "private":"value for setting a project to be private", - "public":"value for setting project to be public", - - "export_and_copy":"label for Export and Copying project options", - "download_project_as_zip":"Download project as Zip", - - "delete_forever":"button texts used to confirm that the user wants to delete the project forever (no going back)", - "confirm_delete_project":"message asking the user if they do want to delete the project", - - "support_and_feedback":"header at top of every page for linking to Support and feedback", - "help":"header at top of every page for linking to Help", - "latex_templates":"header at top of every page for linking to LaTeX Templates", - "info":"header at top of every page for linking to Info", - "latex_help_guide":"header at top of every page under the info dropbox linking to LaTeX help guide", - "latex_resources":"header at top of every page under the info dropbox linking to LaTeX Resources", - - "choose_your_plan":"Choose your plan https://www.sharelatex.com/user/subscription/plans ", - "indvidual_plans":"Individual Plans https://www.sharelatex.com/user/subscription/plans", - "free_forever":"Free forever https://www.sharelatex.com/user/subscription/plans", - "low_priority_compile":"Low priority compiling https://www.sharelatex.com/user/subscription/plans", - "unlimited_projects":"Unlimited projects https://www.sharelatex.com/user/subscription/plans", - "unlimited_compiles":"Unlimited compiles https://www.sharelatex.com/user/subscription/plans", - "full_history_of_changes":"Full history of changes https://www.sharelatex.com/user/subscription/plans", - "highest_priority_compiling":"Highest priority compiling https://www.sharelatex.com/user/subscription/plans", - "dropbox_sync":"Dropbox Sync https://www.sharelatex.com/user/subscription/plans", - "beta":"used as a label when a feature is in Beta", - "google_drive_intergration":"Google Drive integration https://www.sharelatex.com/user/subscription/plans", - "coming_soon":"used as a label when a feature is coming soon", - "git_access":"Git access", - "sign_up_now":"Sign Up Now button on https://www.sharelatex.com/user/subscription/plans to sign up now", - "multi_team_members":"__count__ team members https://www.sharelatex.com/user/subscription/plans ", - "you_plus_multi_free_users":"You + __count__ free users per project https://www.sharelatex.com/user/subscription/plans", - "group_plans":"Group Plans https://www.sharelatex.com/user/subscription/plans", - "annual":"Annual used for annual subscriptions", - "half_price_student":"Half price student plans", - - "about_us":"About Us header used for the about us page https://www.sharelatex.com/about", - "meet_team_behind_sl":"opening blurb for about us page https://www.sharelatex.com/about", - "about_henry_oswald":"about Henry - https://www.sharelatex.com/about", - "about_james_allen":"about James - https://www.sharelatex.com/about", - "motivation_behind_sl":"motivation behind ShareLaTeX - https://www.sharelatex.com/about", - "technologies":"header for technologies field", - "about_technology":"paragraph about the technologies we use", - - "attribution":"header for Attribution page - https://www.sharelatex.com/attribution", - "thanks_to_open_source_components":"thanks to open source - https://www.sharelatex.com/attribution", - "about_nodejs_and_npm":"https://www.sharelatex.com/attribution", - "about_pdfjs_list_view":"https://www.sharelatex.com/attribution", - "about_bootstrap":"https://www.sharelatex.com/attribution" -} \ No newline at end of file diff --git a/services/web/package.json b/services/web/package.json index 872b17952b..83f16d0f96 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -28,6 +28,7 @@ "mixpanel": "0.0.18", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master", + "translations-sharelatex": "git+https://henryoswald@bitbucket.org/henryoswald/translations-sharelatex.git#master", "soa-req-id": "git+https://github.com/sharelatex/soa-req-id.git#master", "fairy": "0.0.2", "node-uuid": "1.4.0", @@ -37,8 +38,7 @@ "archiver": "0.5.1", "nodetime": "0.8.15", "mocha": "1.17.1", - "redback": "0.3.7", - "i18next": "~1.7.1" + "redback": "0.3.7" }, "devDependencies": { "chai": "", From c718535068a059a2ab3bb0b7ca3a94387154070b Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 26 Mar 2014 17:30:25 +0000 Subject: [PATCH 6/6] use github translate-sharelatex module --- services/web/app/coffee/infrastructure/Server.coffee | 2 +- services/web/app/views/project/list.jade | 2 +- services/web/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index 5eba75971c..2421df7e32 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -15,7 +15,7 @@ sessionStore = new RedisStore(host:Settings.redis.web.host, port:Settings.redis. cookieParser = express.cookieParser(Settings.security.sessionSecret) oneDayInMilliseconds = 86400000 ReferalConnect = require('../Features/Referal/ReferalConnect') -translations = require "translations" +translations = require "translations-sharelatex" Monitor = require "./Monitor" diff --git a/services/web/app/views/project/list.jade b/services/web/app/views/project/list.jade index 36badcd928..31a1af1782 100644 --- a/services/web/app/views/project/list.jade +++ b/services/web/app/views/project/list.jade @@ -87,7 +87,7 @@ block content a.normalText.menu-indent(href="/templates/thesis") Thesis li a.normalText.menu-indent(href="/templates/bibliographies") Bibliographies - h1 #{translate("projects")} translate + h1 #{translate("projects")} - if (projects.length > 0) .row-fluid .span9 diff --git a/services/web/package.json b/services/web/package.json index 83f16d0f96..d646f2f8f6 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -28,7 +28,7 @@ "mixpanel": "0.0.18", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master", - "translations-sharelatex": "git+https://henryoswald@bitbucket.org/henryoswald/translations-sharelatex.git#master", + "translations-sharelatex": "git+https://github.com/sharelatex/translations-sharelatex.git#master", "soa-req-id": "git+https://github.com/sharelatex/soa-req-id.git#master", "fairy": "0.0.2", "node-uuid": "1.4.0",