-
Notifications
You must be signed in to change notification settings - Fork 304
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
[WIP] Stop unpacking .po files from content packs #5524
[WIP] Stop unpacking .po files from content packs #5524
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.17.x #5524 +/- ##
=========================================
+ Coverage 62.77% 62.8% +0.02%
=========================================
Files 117 117
Lines 6555 6549 -6
=========================================
- Hits 4115 4113 -2
+ Misses 2440 2436 -4
Continue to review full report at Codecov.
|
kalite/settings/base.py
Outdated
if not os.path.exists(DEFAULT_DATABASE_DIR): | ||
os.mkdir(DEFAULT_DATABASE_DIR) | ||
|
||
ensure_dir(USER_WRITABLE_LOCALE_DIR) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes :)
kalite/settings/base.py
Outdated
DEFAULT_DATABASE_DIR = os.path.join(USER_DATA_ROOT, "database",) | ||
if not os.path.exists(DEFAULT_DATABASE_DIR): | ||
os.mkdir(DEFAULT_DATABASE_DIR) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
kalite/settings/base.py
Outdated
@@ -188,16 +188,15 @@ | |||
# the user running kalite and should be in a user-data | |||
# storage place. | |||
|
|||
USER_WRITABLE_LOCALE_DIR = os.path.join(USER_DATA_ROOT, 'locale') | |||
KALITE_APP_LOCALE_DIR = os.path.join(USER_DATA_ROOT, 'locale') | |||
from fle_utils.general import ensure_dir |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Great that coverage will improve because affected (removed!) code has no coverage :D |
lang = lcode_to_django_lang(lang) | ||
modir = get_po_filepath(lang) | ||
if not os.path.exists(modir): | ||
os.makedirs(modir) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
kalite/settings/base.py
Outdated
@@ -188,14 +188,12 @@ | |||
# the user running kalite and should be in a user-data | |||
# storage place. | |||
|
|||
USER_WRITABLE_LOCALE_DIR = os.path.join(USER_DATA_ROOT, 'locale') | |||
KALITE_APP_LOCALE_DIR = os.path.join(USER_DATA_ROOT, 'locale') | |||
USER_WRITABLE_LOCALE_DIR = os.path.join(USER_DATA_ROOT, 'project', 'locale') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…older to kalite/project/locale.
@benjaoming I just went back again on this PR, while reading the original issue again, I just wanted to know if the |
Originally, the instructions are:
But there were other factors that affects the old process and I cannot just simply remove the
I’m not quite sure if it is correct and it still might be missing something. Mind checking these procedures @benjaoming ? |
Ah no, the description doesn't say to remove the directory, just to remove it from the settings so we are sure translations still living there (from old content pack installations) are ignored:
|
Hi @mrpau-eugene - I'll try to continue work over in #5537, will perhaps pass it back to you later -- the communication regarding how to understand the issue that I posted was a bit heavy for me to keep up with, but the task is also very much entangled in our old understanding of how KA Lite works -- so hopefully this will be the last headache about translations stuff, before we can move on to a more modern CrowdIn-based approach. |
@benjaoming sure! just ping me anytime :) |
TODO
If not all TODOs are marked, this PR is considered WIP (work in progress)
.po
files from content packs~/.kalite/locale
fromLOCALE_PATHS
, it shouldn't be necessary anymorekalite/project/locale
worksIssues addressed
#5518