Skip to content

Commit

Permalink
Merge pull request #108 from ScrumLATAMComunidad/develop
Browse files Browse the repository at this point in the history
Release 001
  • Loading branch information
macagua committed Aug 14, 2023
2 parents 7327ae8 + f002f7c commit e2f96c4
Show file tree
Hide file tree
Showing 65 changed files with 2,994 additions and 147 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
*share
MANIFEST

# PyInstaller
Expand Down Expand Up @@ -53,7 +54,7 @@ coverage.xml

# Translations
*.mo
*.pot
!*.pot

# Django stuff:
*.log
Expand Down
8 changes: 8 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ test: ## run tests
test_quiet: ## run tests removing deprecation warnings
PYTHONWARNINGS=ignore ./bin/zope-testrunner --auto-color --auto-progress --test-path src/slc_web/src/

.PHONY: coverage
coverage: ## run tests coverage reports
./bin/zope-testrunner --coverage slc_web --auto-color --auto-progress --test-path src/slc_web/src/

.PHONY: coverage_quiet
coverage_quiet: ## run tests coverage reports removing deprecation warnings
PYTHONWARNINGS=ignore ./bin/zope-testrunner --coverage slc_web --auto-color --auto-progress --test-path src/slc_web/src/

.PHONY: create-site
create-site: instance/etc/zope.ini ## Create a new site from scratch
PYTHONWARNINGS=ignore ./bin/zconsole run instance/etc/zope.conf ./scripts/create_site.py
Expand Down
5 changes: 5 additions & 0 deletions backend/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-c requirements.txt

mr.bob==1.0.0
bobtemplates.plone==6.3.0
plonecli==2.5
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-c constraints.txt
-e src/slc_web
-e src/slc_web[test]

zope.testrunner
Expand Down
9 changes: 6 additions & 3 deletions backend/src/slc_web/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Installer for the slc_web package."""

from pathlib import Path
from setuptools import find_packages
from setuptools import setup
Expand All @@ -9,13 +10,15 @@
{Path("CONTRIBUTORS.md").read_text()}\n
{Path("CHANGES.md").read_text()}\n
"""
source_url = "https://github.com/ScrumLATAMComunidad/scrumlatamcomunidad.com"


setup(
name="slc_web",
version="1.0.0a1",
description="SCRUM LATAM Comunidad Web portal configuration package.",
long_description=long_description,
# Get more from https://pypi.org/classifiers/
classifiers=[
"Environment :: Web Environment",
"Framework :: Plone",
Expand All @@ -32,11 +35,11 @@
keywords="Python Plone CMS",
author="Leonardo J. Caballero G.",
author_email="leonardoc@plone.org",
url="https://github.com/ScrumLATAMComunidad/scrumlatamcomunidad.com",
url=source_url,
project_urls={
"PyPI": "https://pypi.python.org/pypi/slc_web",
"Source": "https://github.com/ScrumLATAMComunidad/scrumlatamcomunidad.com",
"Tracker": "https://github.com/ScrumLATAMComunidad/slc-sitioweb/issues",
"Source": source_url,
"Tracker": f"{source_url}/issues",
},
license="GPL version 2",
packages=find_packages("src", exclude=["ez_setup"]),
Expand Down
6 changes: 6 additions & 0 deletions backend/src/slc_web/src/slc_web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
import logging


PACKAGE_NAME = "slc_web"

# Permissions Roles
ADD_SPONSOR_ROLES = ["Manager", "Site Administrator", "Sponsorship Committee"]
MANAGE_SPONSOR_ROLES = ["Manager", "Sponsorship Committee"]

_ = MessageFactory("slc_web")

logger = logging.getLogger("slc_web")
1 change: 1 addition & 0 deletions backend/src/slc_web/src/slc_web/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<include file="dependencies.zcml" />

<include file="permissions.zcml" />

<include file="profiles.zcml" />

<!-- -*- extra stuff goes here -*- -->
Expand Down
8 changes: 7 additions & 1 deletion backend/src/slc_web/src/slc_web/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@


class ISLC_WEBLayer(IDefaultBrowserLayer):
"""Marker interface that defines a browser layer."""
"""Marker interface that defines a browser layer.
Args:
IDefaultBrowserLayer (class): The default layer
"""

pass
55 changes: 55 additions & 0 deletions backend/src/slc_web/src/slc_web/locales/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Adding and updating locales
---------------------------

For every language you want to translate into you need a
locales/[language]/LC_MESSAGES/slc_web.po
(e.g. locales/de/LC_MESSAGES/slc_web.po)

For German

.. code-block:: console
$ mkdir de
For updating locales

.. code-block:: console
$ ./bin/update_locale
Note
----

The script uses ``gettext`` package for internationalization.

Install it before running the script.

On Linux
--------

.. code-block:: console
$ sudo apt install gettext
On macOS
--------

.. code-block:: console
$ brew install gettext
On Windows
----------

see https://mlocati.github.io/articles/gettext-iconv-windows.html


Python dependencies
-------------------

You need to install dependencies for updating locales,
executing the following command:

.. code-block:: console
$ pip install i18ndude==5.5.0
Loading

0 comments on commit e2f96c4

Please sign in to comment.