Skip to content

Commit

Permalink
Mark ma region and province choices as translatable.
Browse files Browse the repository at this point in the history
Ref: #270
  • Loading branch information
benkonrath committed Dec 19, 2016
1 parent 8756cdb commit cfc436e
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 87 deletions.
152 changes: 77 additions & 75 deletions localflavor/ma/ma_provinces.py
Original file line number Diff line number Diff line change
@@ -1,84 +1,86 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

#: An alphabetical list of provinces for use as `choices` in a formfield.
#: http://www.pncl.gov.ma/fr/Pages/decoupage.aspx
PROVINCE_CHOICES_PER_REGION = (
('01', 'Al Hoceima', '01'),
('02', 'Larache', '01'),
('03', 'M’Diq - Fnideq', '01'),
('04', 'Tetouan', '01'),
('05', 'Chefchaouene', '01'),
('06', 'Tanger - Assilah', '01'),
('07', 'Fahs - Anjra', '01'),
('08', 'Ouezzane', '01'),
('09', 'Driouch', '02'),
('10', 'Nador', '02'),
('11', 'Berkan', '02'),
('12', 'Taourirt', '02'),
('13', 'Jerada', '02'),
('14', 'Guercif', '02'),
('15', 'Feguig', '02'),
('16', 'Oujda - Angad', '02'),
('17', 'El Hajeb', '03'),
('18', 'Ifrane', '03'),
('19', 'Boulemane', '03'),
('20', 'Taza', '03'),
('21', 'Taounate', '03'),
('22', 'Sefrou', '03'),
('23', 'Fès', '03'),
('24', 'Meknès', '03'),
('25', 'Moulay Yacoub', '03'),
('26', 'Khémisset', '04'),
('27', 'Rabat', '04'),
('28', 'Skhirate - Temara', '04'),
('29', 'Kénitra', '04'),
('30', 'Salé', '04'),
('31', 'Sidi Slimane', '04'),
('32', 'Sidi Kacem', '04'),
('33', 'Casablanca', '05'),
('34', 'Mohamedia', '05'),
('35', 'Nouaceur', '05'),
('36', 'Mediouna', '05'),
('37', 'Benslimane', '05'),
('38', 'Berrachid', '05'),
('39', 'El Jadida', '05'),
('40', 'Sidi Bennour', '05'),
('41', 'Settat', '05'),
('42', 'Azilal', '06'),
('43', 'Fquih Ben Saleh', '06'),
('44', 'Beni Mellal', '06'),
('45', 'Khouribga', '06'),
('46', 'Khénifra', '06'),
('47', 'Safi', '07'),
('48', 'Al Haouz', '07'),
('49', 'Rhamna', '07'),
('50', 'Essaouira', '07'),
('51', 'Youssoufia', '07'),
('52', 'Marrakech', '07'),
('53', 'Chichaoua', '07'),
('54', 'El Kelaa Des Sraghna', '07'),
('55', 'Agadir - Idda Outanane', '08'),
('56', 'Inezgane - Ait Melloul', '08'),
('57', 'Chtouka - Ait Baha', '08'),
('58', 'Tiznit', '08'),
('59', 'Tata', '08'),
('60', 'Taroudant', '08'),
('61', 'Errachidia', '09'),
('62', 'Tinghir', '09'),
('63', 'Zagoura', '09'),
('64', 'Midelt', '09'),
('65', 'Ouarzazate', '09'),
('66', 'Es -Semara', '12'),
('67', 'Laayoune', '12'),
('68', 'Boujdour', '12'),
('69', 'Terfaya', '12'),
('70', 'Aousserd', '10'),
('71', 'Oued Eddahab', '10'),
('72', 'Assa - Zag', '11'),
('73', 'Sidi Ifni', '11'),
('74', 'Tantan', '11'),
('75', 'Guelmim', '11'),
('01', _('Al Hoceima'), '01'),
('02', _('Larache'), '01'),
('03', _('M’Diq - Fnideq'), '01'),
('04', _('Tetouan'), '01'),
('05', _('Chefchaouene'), '01'),
('06', _('Tanger - Assilah'), '01'),
('07', _('Fahs - Anjra'), '01'),
('08', _('Ouezzane'), '01'),
('09', _('Driouch'), '02'),
('10', _('Nador'), '02'),
('11', _('Berkan'), '02'),
('12', _('Taourirt'), '02'),
('13', _('Jerada'), '02'),
('14', _('Guercif'), '02'),
('15', _('Feguig'), '02'),
('16', _('Oujda - Angad'), '02'),
('17', _('El Hajeb'), '03'),
('18', _('Ifrane'), '03'),
('19', _('Boulemane'), '03'),
('20', _('Taza'), '03'),
('21', _('Taounate'), '03'),
('22', _('Sefrou'), '03'),
('23', _('Fès'), '03'),
('24', _('Meknès'), '03'),
('25', _('Moulay Yacoub'), '03'),
('26', _('Khémisset'), '04'),
('27', _('Rabat'), '04'),
('28', _('Skhirate - Temara'), '04'),
('29', _('Kénitra'), '04'),
('30', _('Salé'), '04'),
('31', _('Sidi Slimane'), '04'),
('32', _('Sidi Kacem'), '04'),
('33', _('Casablanca'), '05'),
('34', _('Mohamedia'), '05'),
('35', _('Nouaceur'), '05'),
('36', _('Mediouna'), '05'),
('37', _('Benslimane'), '05'),
('38', _('Berrachid'), '05'),
('39', _('El Jadida'), '05'),
('40', _('Sidi Bennour'), '05'),
('41', _('Settat'), '05'),
('42', _('Azilal'), '06'),
('43', _('Fquih Ben Saleh'), '06'),
('44', _('Beni Mellal'), '06'),
('45', _('Khouribga'), '06'),
('46', _('Khénifra'), '06'),
('47', _('Safi'), '07'),
('48', _('Al Haouz'), '07'),
('49', _('Rhamna'), '07'),
('50', _('Essaouira'), '07'),
('51', _('Youssoufia'), '07'),
('52', _('Marrakech'), '07'),
('53', _('Chichaoua'), '07'),
('54', _('El Kelaa Des Sraghna'), '07'),
('55', _('Agadir - Idda Outanane'), '08'),
('56', _('Inezgane - Ait Melloul'), '08'),
('57', _('Chtouka - Ait Baha'), '08'),
('58', _('Tiznit'), '08'),
('59', _('Tata'), '08'),
('60', _('Taroudant'), '08'),
('61', _('Errachidia'), '09'),
('62', _('Tinghir'), '09'),
('63', _('Zagoura'), '09'),
('64', _('Midelt'), '09'),
('65', _('Ouarzazate'), '09'),
('66', _('Es -Semara'), '12'),
('67', _('Laayoune'), '12'),
('68', _('Boujdour'), '12'),
('69', _('Terfaya'), '12'),
('70', _('Aousserd'), '10'),
('71', _('Oued Eddahab'), '10'),
('72', _('Assa - Zag'), '11'),
('73', _('Sidi Ifni'), '11'),
('74', _('Tantan'), '11'),
('75', _('Guelmim'), '11'),
)

#: A list of Provinces
Expand Down
26 changes: 14 additions & 12 deletions localflavor/ma/ma_regions.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

#: An alphabetical list of regions for use as `choices` in a formfield.
#: http://www.pncl.gov.ma/fr/Pages/decoupage.aspx
REGION_CHOICES = (
('01', 'Tanger-Tétouan-Al Hoceïma'),
('02', 'L’Oriental'),
('03', 'Fès-Meknès'),
('04', 'Rabat-Salé-Kénitra'),
('05', 'Béni Mellal-Khénifra'),
('06', 'Casablanca-Settat'),
('07', 'Marrakech-Safi'),
('08', 'Drâa-Tafilalet'),
('09', 'Souss-Massa'),
('10', 'Guelmim-Oued Noun'),
('11', 'Laâyoune-Sakia El Hamra'),
('12', 'Dakhla-Oued Ed Dahab')
('01', _('Tanger-Tétouan-Al Hoceïma')),
('02', _('L’Oriental')),
('03', _('Fès-Meknès')),
('04', _('Rabat-Salé-Kénitra')),
('05', _('Béni Mellal-Khénifra')),
('06', _('Casablanca-Settat')),
('07', _('Marrakech-Safi')),
('08', _('Drâa-Tafilalet')),
('09', _('Souss-Massa')),
('10', _('Guelmim-Oued Noun')),
('11', _('Laâyoune-Sakia El Hamra')),
('12', _('Dakhla-Oued Ed Dahab')),
)

0 comments on commit cfc436e

Please sign in to comment.