Skip to content

Commit

Permalink
Merge pull request #5 from audricschiltknecht/release-1.8.1
Browse files Browse the repository at this point in the history
Release 1.8.1
  • Loading branch information
kjd authored Nov 14, 2017
2 parents 38fe9ef + e977fa7 commit e379ebe
Show file tree
Hide file tree
Showing 33 changed files with 277 additions and 220 deletions.
6 changes: 6 additions & 0 deletions Release_Notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# LGR-Toolset Release notes

## 1.8.1 (2017-11-15)
Fixes:
- Remove script/mimetype from merged description when all descriptions use the text/html mimetype.
- Fix cross-script variants tool: output variants composed of code point which are in other scripts
than the one(s) defined in the LGR.

## 1.8 (2017-10-18)
Fixes:
- Merge LGR containing the same code point.
Expand Down
2 changes: 1 addition & 1 deletion etc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ celery[redis]==3.1.23
# LGR/Unicode modules
picu==0.8
munidata==1.2
lgr-core==1.8
lgr-core==1.8.1

# Natural sorting implementation
natsort==5.0.3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='lgr-django',
version='1.8',
version='1.8.1',
author='Viagenie and Wil Tan',
author_email='[email protected]',
packages=find_packages('src'),
Expand Down
Binary file modified src/lgr_editor/locale/ar/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lgr_editor/locale/ar/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-11 17:06+0000\n"
"POT-Creation-Date: 2017-10-30 20:24+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Binary file modified src/lgr_editor/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lgr_editor/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-11 17:06+0000\n"
"POT-Creation-Date: 2017-10-30 20:24+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Binary file modified src/lgr_editor/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lgr_editor/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-11 17:06+0000\n"
"POT-Creation-Date: 2017-10-30 20:24+0000\n"
"PO-Revision-Date: 2017-10-11 13:11-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
8 changes: 3 additions & 5 deletions src/lgr_tools/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,12 @@ def lgr_set_annotate_labels(lgr, script_lgr, set_labels, labels_file):
return lgr_set_annotate(lgr, script_lgr, set_labels, labels_file)


def lgr_cross_script_variants(merged_lgr, lgr_set, unidb, labels_file):
def lgr_cross_script_variants(lgr, labels_file):
"""
Compute cross-script variants of a list of labels in a LGR.
:param merged_lgr: The merged LGR object.
:param lgr_set: The LGR set object.
:param unidb: The unicode database to use.
:param lgr: The LGR to use for variant generation.
:param labels_file: The file containing the list of labels
:return: Text log to be displayed
"""
return cross_script_variants(merged_lgr, lgr_set, unidb, labels_file)
return cross_script_variants(lgr, labels_file)
57 changes: 26 additions & 31 deletions src/lgr_tools/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,57 +142,44 @@ def __init__(self, *args, **kwargs):
self.fields['lgr'].initial = lgr_id


class LGRAnnotateSelector(forms.Form):
class LGRSetCompatibleForm(forms.Form):
lgr = forms.ChoiceField(label=_("LGR"),
help_text=_('LGR to use for annotation'),
required=True,
widget=DataSelectWidget)

set_labels = forms.FileField(label=_("Allocated Set labels"),
required=False,
help_text=_('Optional list of labels already allocated '
'in the LGR set, that will be used to check '
'for collisions when evaluating labels using '
'the merged LGR set'))

script = forms.ChoiceField(label=_("Script"),
help_text=_('The script used to validate the label'),
required=False)

labels = forms.FileField(label=_("Labels"),
help_text=_('List of labels to use in diff. '
'File must be encoded in UNIX format.'),
required=True)

email = forms.EmailField(label=_("E-mail"),
help_text=_('Provide your e-mail address'),
required=True)

def __init__(self, *args, **kwargs):
session_lgrs = kwargs.pop('session_lgrs', {})
lgr_id = kwargs.pop('lgr_id', '')
lgr_info = kwargs.pop('lgr_info', None)
scripts = kwargs.pop('scripts', [])
super(LGRAnnotateSelector, self).__init__(*args, **kwargs)
super(LGRSetCompatibleForm, self).__init__(*args, **kwargs)
lgr_sets = [lgr for lgr in session_lgrs if lgr['is_set']]
lgrs = [lgr for lgr in session_lgrs if not lgr['is_set']]
# dynamically append the session LGRs (by copy, not by reference)
self.fields['lgr'].choices = ((_('LGR'), [(lgr['name'], lgr['name']) for lgr in lgrs]),
(_('LGR set'), [(lgr['name'], lgr['name']) for lgr in lgr_sets]))
self.fields['lgr'].widget.data = {lgr['name']: {'lgr-set': ','.join([l['name'] for l in lgr['lgr_set_dct']])}
for lgr in lgr_sets}
self.fields['lgr'].initial = lgr_id
if lgr_info is not None:
self.fields['lgr'].initial = lgr_info.name
if lgr_info.set_labels_info is not None:
self.fields['set_labels'].initial = lgr_info.set_labels_info.name

if scripts:
self.fields['script'].choices = scripts


class LGRCrossScriptVariantsSelector(forms.Form):
lgr = forms.ChoiceField(label=_("LGR"),
help_text=_('LGR to use for collisions'),
required=True)
class LGRAnnotateSelector(LGRSetCompatibleForm):
set_labels = forms.FileField(label=_("Allocated Set labels"),
required=False,
help_text=_('Optional list of labels already allocated '
'in the LGR set, that will be used to check '
'for collisions when evaluating labels using '
'the merged LGR set'))

labels = forms.FileField(label=_("Labels"),
help_text=_('List of labels to use in diff. '
Expand All @@ -204,10 +191,18 @@ class LGRCrossScriptVariantsSelector(forms.Form):
required=True)

def __init__(self, *args, **kwargs):
session_lgrs = kwargs.pop('session_lgrs', [])
lgr_id = kwargs.pop('lgr_id', '')
super(LGRCrossScriptVariantsSelector, self).__init__(*args, **kwargs)
lgr_sets = [lgr for lgr in session_lgrs if lgr['is_set']]
# dynamically append the session LGRs (by copy, not by reference)
self.fields['lgr'].choices = ((lgr['name'], lgr['name']) for lgr in lgr_sets)
self.fields['lgr'].initial = lgr_id
lgr_info = kwargs.get('lgr_info', None)
super(LGRAnnotateSelector, self).__init__(*args, **kwargs)
if lgr_info is not None and lgr_info.set_labels_info is not None:
self.fields['set_labels'].initial = lgr_info.set_labels_info.name


class LGRCrossScriptVariantsSelector(LGRSetCompatibleForm):
labels = forms.FileField(label=_("Labels"),
help_text=_('List of labels to use in diff. '
'File must be encoded in UNIX format.'),
required=True)

email = forms.EmailField(label=_("E-mail"),
help_text=_('Provide your e-mail address'),
required=True)
Binary file modified src/lgr_tools/locale/ar/LC_MESSAGES/django.mo
Binary file not shown.
38 changes: 19 additions & 19 deletions src/lgr_tools/locale/ar/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-11 17:07+0000\n"
"POT-Creation-Date: 2017-10-30 20:24+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -55,11 +55,11 @@ msgstr ""
msgid "Choose the action to perform on selected LGRs"
msgstr ""

#: forms.py:61 forms.py:114 forms.py:146 forms.py:179 forms.py:193
#: forms.py:61 forms.py:114 forms.py:146 forms.py:164
msgid "LGR"
msgstr ""

#: forms.py:62 forms.py:180
#: forms.py:62 forms.py:165
msgid "LGR set"
msgstr ""

Expand All @@ -71,19 +71,19 @@ msgstr ""
msgid "Second LGR to use in diff"
msgstr ""

#: forms.py:80 forms.py:118 forms.py:162 forms.py:197
#: forms.py:80 forms.py:118 forms.py:184 forms.py:201
msgid "Labels"
msgstr ""

#: forms.py:81 forms.py:119 forms.py:163 forms.py:198
#: forms.py:81 forms.py:119 forms.py:185 forms.py:202
msgid "List of labels to use in diff. File must be encoded in UNIX format."
msgstr ""

#: forms.py:85 forms.py:123 forms.py:167 forms.py:202
#: forms.py:85 forms.py:123 forms.py:189 forms.py:206
msgid "E-mail"
msgstr ""

#: forms.py:86 forms.py:124 forms.py:168 forms.py:203
#: forms.py:86 forms.py:124 forms.py:190 forms.py:207
msgid "Provide your e-mail address"
msgstr ""

Expand Down Expand Up @@ -111,7 +111,7 @@ msgstr ""
msgid "Show rules in output (this can be very verbose)"
msgstr ""

#: forms.py:115 forms.py:194
#: forms.py:115
msgid "LGR to use for collisions"
msgstr ""

Expand All @@ -120,25 +120,25 @@ msgid "LGR to use for annotation"
msgstr ""

#: forms.py:151
msgid "Allocated Set labels"
msgid "Script"
msgstr ""

#: forms.py:153
msgid ""
"Optional list of labels already allocated in the LGR set, that will be used "
"to check for collisions when evaluating labels using the merged LGR set"
#: forms.py:152
msgid "The script used to validate the label"
msgstr ""

#: forms.py:158
msgid "Script"
#: forms.py:177
msgid "Allocated Set labels"
msgstr ""

#: forms.py:159
msgid "The script used to validate the label"
#: forms.py:179
msgid ""
"Optional list of labels already allocated in the LGR set, that will be used "
"to check for collisions when evaluating labels using the merged LGR set"
msgstr ""

#: templates/lgr_tools/annotate.html:15 templates/lgr_tools/collision.html:11
#: templates/lgr_tools/cross_script_variants.html:11
#: templates/lgr_tools/cross_script_variants.html:14
#: templates/lgr_tools/diff.html:12
msgid ""
"As the computing may be very long, we will warn by e-mail once the result "
Expand Down Expand Up @@ -198,7 +198,7 @@ msgid ""
"simple LGRs, union and intersection are not available for LGR sets.</strong>"
msgstr ""

#: templates/lgr_tools/cross_script_variants.html:17
#: templates/lgr_tools/cross_script_variants.html:20
msgid "Launch"
msgstr ""

Expand Down
Binary file modified src/lgr_tools/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
38 changes: 19 additions & 19 deletions src/lgr_tools/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-11 17:07+0000\n"
"POT-Creation-Date: 2017-10-30 20:24+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -53,11 +53,11 @@ msgstr ""
msgid "Choose the action to perform on selected LGRs"
msgstr ""

#: forms.py:61 forms.py:114 forms.py:146 forms.py:179 forms.py:193
#: forms.py:61 forms.py:114 forms.py:146 forms.py:164
msgid "LGR"
msgstr ""

#: forms.py:62 forms.py:180
#: forms.py:62 forms.py:165
msgid "LGR set"
msgstr ""

Expand All @@ -69,19 +69,19 @@ msgstr ""
msgid "Second LGR to use in diff"
msgstr ""

#: forms.py:80 forms.py:118 forms.py:162 forms.py:197
#: forms.py:80 forms.py:118 forms.py:184 forms.py:201
msgid "Labels"
msgstr ""

#: forms.py:81 forms.py:119 forms.py:163 forms.py:198
#: forms.py:81 forms.py:119 forms.py:185 forms.py:202
msgid "List of labels to use in diff. File must be encoded in UNIX format."
msgstr ""

#: forms.py:85 forms.py:123 forms.py:167 forms.py:202
#: forms.py:85 forms.py:123 forms.py:189 forms.py:206
msgid "E-mail"
msgstr ""

#: forms.py:86 forms.py:124 forms.py:168 forms.py:203
#: forms.py:86 forms.py:124 forms.py:190 forms.py:207
msgid "Provide your e-mail address"
msgstr ""

Expand Down Expand Up @@ -109,7 +109,7 @@ msgstr ""
msgid "Show rules in output (this can be very verbose)"
msgstr ""

#: forms.py:115 forms.py:194
#: forms.py:115
msgid "LGR to use for collisions"
msgstr ""

Expand All @@ -118,25 +118,25 @@ msgid "LGR to use for annotation"
msgstr ""

#: forms.py:151
msgid "Allocated Set labels"
msgid "Script"
msgstr ""

#: forms.py:153
msgid ""
"Optional list of labels already allocated in the LGR set, that will be used "
"to check for collisions when evaluating labels using the merged LGR set"
#: forms.py:152
msgid "The script used to validate the label"
msgstr ""

#: forms.py:158
msgid "Script"
#: forms.py:177
msgid "Allocated Set labels"
msgstr ""

#: forms.py:159
msgid "The script used to validate the label"
#: forms.py:179
msgid ""
"Optional list of labels already allocated in the LGR set, that will be used "
"to check for collisions when evaluating labels using the merged LGR set"
msgstr ""

#: templates/lgr_tools/annotate.html:15 templates/lgr_tools/collision.html:11
#: templates/lgr_tools/cross_script_variants.html:11
#: templates/lgr_tools/cross_script_variants.html:14
#: templates/lgr_tools/diff.html:12
msgid ""
"As the computing may be very long, we will warn by e-mail once the result "
Expand Down Expand Up @@ -196,7 +196,7 @@ msgid ""
"simple LGRs, union and intersection are not available for LGR sets.</strong>"
msgstr ""

#: templates/lgr_tools/cross_script_variants.html:17
#: templates/lgr_tools/cross_script_variants.html:20
msgid "Launch"
msgstr ""

Expand Down
Binary file modified src/lgr_tools/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit e379ebe

Please sign in to comment.