Project

General

Profile

Tâche #19542

Scénario #19476: Traitements express EWT

Les messages traduits dans le nouveau loader ne sont plus affiché

Added by Emmanuel GARETTE over 4 years ago. Updated over 4 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Gwenael Remond
Start date:
02/08/2017
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:
Remaining (hours):
0.0

Description

Les messages d'erreurs sont retournées en unicode et non en str.

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from creole.loader import creole_loader
/usr/share/creole/funcs/quota.py - déjà défini : system_out
>>> c=creole_loader(load_extra=True)
Une variable de l'espace de nom quota ne devrait pas être utilisée dans l'espace quota.quota.quota_maxfactor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 753, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 438, in space_visitor
    SpaceAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 791, in __init__
    self._parse_object_space(space, None)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 883, in _parse_object_space
    self._parse_subobject_space(name, node_name, space, subspace, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 908, in _parse_subobject_space
    self._parse_subobject_space(subname, name, space, subspace, None, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 905, in _parse_subobject_space
    self._parse_object_space(subspace, current_namespace, name, parent_path, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 883, in _parse_object_space
    self._parse_subobject_space(name, node_name, space, subspace, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 910, in _parse_subobject_space
    self.absolute_paths_annotation(name, node_name, parent, space, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1060, in absolute_paths_annotation
    subpath = self.paths.get_variable_path(value_name, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 602, in get_variable_path
    dico['namespace'], current_namespace))
creole.error.CreoleDictConsistencyError: <exception str() failed>

Associated revisions

Revision 855efdda (diff)
Added by Gwenael Remond over 4 years ago

the translated messages aren't in unicode so that they can appear in the ead3

Ref  #19542

History

#1 Updated by Gwenael Remond over 4 years ago

  • Estimated time changed from 4.00 h to 1.00 h
  • Remaining (hours) changed from 4.0 to 0.0

#2 Updated by Gwenael Remond over 4 years ago

  • % Done changed from 0 to 100

#3 Updated by Gwenael Remond over 4 years ago

  • Assigned To set to Gwenael Remond

#4 Updated by Gwenael Remond over 4 years ago

  • Status changed from Nouveau to En cours

#5 Updated by Scrum Master over 4 years ago

  • Status changed from En cours to Résolu

#6 Updated by Lionel Morin over 4 years ago

Testé avec en remplaçant une variable par une autre dans un dico (ex dans majonce/00_action.xml, majonce.mise_a_jour.majoption => shutdown.shutdown.typeex), puis :

>>> from creole.loader import creole_loader
>>> c = creole_loader(load_extra=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 753, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 438, in space_visitor
    SpaceAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 790, in __init__
    self.filter_condition(space.constraints.condition)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1470, in filter_condition
    self.filter_target(condition, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1379, in filter_target
    target.name = self.paths.get_variable_path(target.name, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 599, in get_variable_path
    dico['namespace'], current_namespace).encode('utf8'))
creole.error.CreoleDictConsistencyError: Une variable de l'espace de nom shutdown ne devrait pas être utilisée dans l'espace majonce

=> C'est bien l'erreur attendue

#7 Updated by Lionel Morin over 4 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF