Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Documentation #15

wants to merge 1 commit into from

Conversation

Ydrasil
Copy link
Contributor

@Ydrasil Ydrasil commented Jun 9, 2017

No description provided.

readme.md Outdated
Call `flask_methods` with `app` and the function.
After that, you can use the function `_` or `trans` in your template for translation.

A minimal example :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no space before ":" in English

readme.md Outdated
@@ -24,3 +24,28 @@ from tcii18n import Translator
translator = Translator('my_file.csv')
translator.translate('My string')
```

For using this project into a Flask application.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this block here, I'd rather read the code sample first and then explaining the code under the sample:

(code samples that you wrote)

Where:

  • get_translations_file() is a function that returns the appropriate translation file path,
  • flask_methods(app, get_translation_file) initializes the template processor with app as your Flask instance and get_translation_file is the reference to the callable method.


Where:

-get_translations_file() is a function that returns the appropriate translation file path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-get_translations_file() > add a space after "-" and use backticks ` for showing it as code.

Where:

-get_translations_file() is a function that returns the appropriate translation file path
-flask_methods(app, get_translation_file) initializes the template processor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here


-get_translations_file() is a function that returns the appropriate translation file path
-flask_methods(app, get_translation_file) initializes the template processor
with app as your Flask instance and get_translation_file is the reference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here for get_translation_file

@vinyll vinyll force-pushed the master branch 2 times, most recently from 2f4228c to f397a4f Compare January 26, 2018 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants