Silme:Naming convention
From MozillaWiki
For 0.8
Ideas for changes in Silme 0.8:
- ...
- ...
In 0.7
Amount of changes for Silme 0.7. We may want to incorporate some of those patterns for format/io in Silme 0.8.
- silme.core.Entity.get_value() -> silme.core.Entity.value
- silme.core.Entity.get_value('ab') -> silme.core.Entity['ab']
- silme.core.Entity.set_value('foo','ab') -> silme.core.Entity['ab'] = 'foo'
- silme.core.Entity.remove_value('ab') -> del silme.core.Entity['ab']
- silme.core.Entity.remove_value() -> del silme.core.Entity.value
- silme.core.EntityList.get_entity('id') -> silme.core.EntityList['id']
(in above cases all get_value, set_value, remove_value still work, but the new syntax should be more handy)
Other changes:
- silme.core.L10nObject -> silme.core.Structure
- silme.core.L10nPackage -> silme.core.Package
- silme.diff.entitylist -> silme.diff.list
- silme.diff.l10nobject -> silme.diff.structure
- silme.diff.l10nobject.L10nObjectDiff -> silme.diff.StructureDiff
- silme.diff.L10nPackageDiff -> silme.diff.PackageDiff
- silme.diff.package.L10nPackageDiff -> silme.diff.PackageDiff
- silme.diff.L10nPackageDiff -> silme.diff.PackageDiff
- silme.core.EntityList.get_entity_ids -> silme.core.EntityList.ids
- silme.diff.PackageDiff.get_package -> silme.diff.PackageDiff.package
- silme.diff.PackageDiff.get_packages -> silme.diff.PackageDiff.packages
- silme.diff.PackageDiff.get_object_type -> silme.diff.PackageDiff.structure_type
- silme.diff.PackageDiff.get_package_type -> silme.diff.PackageDiff.package_type
- silme.core.L10nPackage.packages -> silme.core.L10nPackage._packages
- silme.core.L10nPackage.objects -> silme.core.L10nPackage._structures
- silme.diff.PackageDiff.has_object -> silme.diff.PackageDiff.has_structure
- silme.core.Package.has_object -> silme.core.Package.has_structure
- silme.diff.PackageDiff.get_objects -> silme.diff.PackageDiff.structures
- silme.core.Package.get_package -> silme.core.Package.package
- silme.core.Package.get_packages -> silme.core.Package.packages
- silme.core.Package.get_objects -> silme.core.Package.structures
- silme.diff.EntityListDiff.get_entities -> silme.diff.EntityListDiff.entities
- silme.core.Package.get_object -> silme.core.Package.structure
- silme.core.EntityList.get_entities -> silme.core.EntityList.entities