{"id":22831508,"url":"https://github.com/phrase/django-phrase","last_synced_at":"2025-04-23T19:42:38.473Z","repository":{"id":9307042,"uuid":"11146481","full_name":"phrase/django-phrase","owner":"phrase","description":"Phrase for Django Applications","archived":false,"fork":false,"pushed_at":"2024-08-21T12:32:27.000Z","size":67,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-15T00:22:59.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://phrase.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phrase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-03T09:15:00.000Z","updated_at":"2024-08-21T12:32:30.000Z","dependencies_parsed_at":"2023-12-01T12:15:22.753Z","dependency_job_id":"b1496305-f65a-430d-adfd-757d15e53748","html_url":"https://github.com/phrase/django-phrase","commit_stats":{"total_commits":52,"total_committers":19,"mean_commits":2.736842105263158,"dds":0.7884615384615384,"last_synced_commit":"ed09139eb4c2db2364a4dc0f8d9140c2589ced75"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fdjango-phrase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fdjango-phrase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fdjango-phrase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fdjango-phrase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phrase","download_url":"https://codeload.github.com/phrase/django-phrase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250501268,"owners_count":21440986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T20:26:22.749Z","updated_at":"2025-04-23T19:42:38.341Z","avatar_url":"https://github.com/phrase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-phrase\n\n**django-phrase** is the official library for integrating [Phrase Strings In-Context Editor](https://support.phrase.com/hc/en-us/articles/5784095916188-In-Context-Editor-Strings) with [Django](https://www.djangoproject.com/)\n\n## :scroll: Documentation\n\n### Prerequisites\n\nTo use django-phrase with your application you have to:\n\n* Sign up for a Phrase account: [https://app.phrase.com/signup](https://app.phrase.com/signup)\n* Use the [Django](https://www.djangoproject.com/) framework for Python\n\n### Demo\n\nYou can find a demo project in the `demo` folder, just run follow the `README.md` in that folder\n\n### Installation\n\n#### NOTE: You can not use the old version of the ICE with integration versions of \u003e2.0.0, you have to instead use 1.x.x versions as before\n#### via pip\n\n```bash\npip install django-phrase\n```\n\n#### Configure\n\nAdd phrase to the list of installed apps::\n```\n    INSTALLED_APPS = (\n        'phrase',\n    )\n```\n\nAdd the following template snippets to your layout file `templates/base_generic.html` or equivalent\n\n```\n    {% load phrase_i18n %}\n    {% phrase_javascript %}\n```\n\nThen use `{% load phrase_i18n %}` in your templates, e.g. `demo/ice_demo/templates/index.html`\n\nAnd the following config to your `settings.py`\n\n```py\n    # Phrase In-Context Editor settings\n    PHRASE_ENABLED = True\n    PHRASE_ACCOUNT_ID = \"YOUR_ACCOUNT_ID\"  # Set your own account id\n    PHRASE_PROJECT_ID = \"YOUR_PROJECT_ID\"  # Set your own project id\n    PHRASE_DATACENTER = \"eu\"  # Choose your datacenter 'eu' | 'us'\n    PHRASE_PREFIX = \"{{__\"\n    PHRASE_SUFFIX = \"__}}\"\n```\n\nYou can find the Project-ID in the Project overview in the PhraseApp Translation Center.\nYou can find the Account-ID in the Organization page in the PhraseApp Translation Center.\n\nIf this does not work for you, you can also integrate the [JavaScript snippet manually](https://help.phrase.com/help/integrate-in-context-editor-into-any-web-framework).\n\nOld version of the ICE is not available since version 2.0.0. If you still would rather use the old version, please go back to 1.x.x versions.\n\n#### Using the US Datacenter with ICE\n\nIn addition to the settings in your `settings.py`, set the US datacenter to enable the ICE to work with the US endpoints.\n```py\n    # Phrase In-Context Editor settings\n    PHRASE_ENABLED = True\n    PHRASE_ACCOUNT_ID = \"YOUR_ACCOUNT_ID\"  # Set your own account id\n    PHRASE_PROJECT_ID = \"YOUR_PROJECT_ID\"  # Set your own project id\n    PHRASE_DATACENTER = \"us\"  # Choose your datacenter 'eu' | 'us'\n    PHRASE_PREFIX = \"{{__\"\n    PHRASE_SUFFIX = \"__}}\"\n```\n\n### How does it work\n\nWhen `PHRASE_ENABLED = True` this package modifies the returning values from translation functions to present a format which the ICE can read.\n\n### Test\n\nRun unit tests:\n\n```bash\npython manage.py test\n```\n\n## :white_check_mark: Commits \u0026 Pull Requests\n\nWe welcome anyone who wants to contribute to our codebase, so if you notice something, feel free to open a Pull Request! However, we ask that you please use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for your commit messages and titles when opening a Pull Request.\n\nExample: `chore: Update README`\n\n## :question: Issues, Questions, Support\n\nPlease use [GitHub issues](https://github.com/phrase/django-phrase/issues) to share your problem, and we will do our best to answer any questions or to support you in finding a solution.\n\n## :memo: Changelog\n\nDetailed changes for each release are documented in the [changelog](https://github.com/phrase/django-phrase/releases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Fdjango-phrase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphrase%2Fdjango-phrase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Fdjango-phrase/lists"}