Skip to content

Commit

Permalink
Merge pull request #242 from cvvergara/fix-links-and-locale-update
Browse files Browse the repository at this point in the history
Fix links and locale update
  • Loading branch information
cvvergara authored Dec 16, 2024
2 parents 52ffce4 + 6f44136 commit ee5b1b7
Show file tree
Hide file tree
Showing 75 changed files with 1,485 additions and 2,039 deletions.
6 changes: 5 additions & 1 deletion .github/scripts/update_locale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ cp build/docs/locale_changes_po.txt build/docs/locale_changes_po_pot.txt
perl -ne '/\/en\// && print' build/docs/locale_changes_po.txt | \
perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' >> build/docs/locale_changes_po_pot.txt # .pot files

# Do not create empty translation files
git status locale/es --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf
git status locale/ja --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf

# Remove obsolete entries #~ from .po files
bash .github/scripts/remove_obsolete_entries.sh

while read -r f; do git add "$f"; done < build/docs/locale_changes_po_pot.txt
cat build/docs/locale_changes_po_pot.txt | xargs -I {} sh -c "(ls {} >> /dev/null 2>&1 && git add {} )"

popd > /dev/null || exit 1
129 changes: 66 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ message(STATUS "PGR_WORKSHOP_DOC_TARGETS = ${PGR_WORKSHOP_DOC_TARGETS}")
# TODO: figure out how to support this
# "el" "hu" "id" "zh")
#---------------------------------------------
set(PGR_WORKSHOP_SUPPORTED_LANGUAGES "es")
set(PGR_WORKSHOP_SUPPORTED_LANGUAGES "es" "ja")
set(PGR_WORKSHOP_ENGLISH "en")

#---------------------------------------------
Expand All @@ -231,72 +231,75 @@ option(ALL_LANG
"Set ON|OFF (default=OFF) to build all documentation supported languages
${PGR_WORKSHOP_SUPPORTED_LANGUAGES}" OFF)

foreach(lang ${PGR_WORKSHOP_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} val)
option(${val}
"Set ON|OFF (default=OFF) build ${lang} Documentation" OFF)
endforeach()
foreach(lang ${PGR_WORKSHOP_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} val)
option(${val}
"Set ON|OFF (default=OFF) build ${lang} Documentation" OFF)
endforeach()

#---------------------------------------------
# Catching the language options to be build
#---------------------------------------------
list(APPEND PGR_WORKSHOP_BUILD_LANGUAGES ${PGR_WORKSHOP_ENGLISH})
#---------------------------------------------
# Catching the language options to be build
#---------------------------------------------
list(APPEND PGR_WORKSHOP_BUILD_LANGUAGES ${PGR_WORKSHOP_ENGLISH})
foreach(lang ${PGR_WORKSHOP_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} opt)
if (${opt} OR ALL_LANG)
list(APPEND PGR_WORKSHOP_BUILD_LANGUAGES ${lang})
endif()
endforeach()


#---------------------------------------------
# All languages po files are to be generated
#---------------------------------------------
set (SPHINXINTL_LANGUAGE ${PGR_WORKSHOP_ENGLISH})
if(LOCALE)
foreach(lang ${PGR_WORKSHOP_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} opt)
if (${opt} OR ALL_LANG)
list(APPEND PGR_WORKSHOP_BUILD_LANGUAGES ${lang})
endif()
set(SPHINXINTL_LANGUAGE "${SPHINXINTL_LANGUAGE},${lang}")
endforeach()
set(PGR_WORKSHOP_LANGUAGES ${PGR_WORKSHOP_ENGLISH})
endif()


#---------------------------------------------
# All languages po files are to be generated
#---------------------------------------------
set (SPHINXINTL_LANGUAGE ${PGR_WORKSHOP_ENGLISH})
if(LOCALE)
foreach(lang ${PGR_WORKSHOP_SUPPORTED_LANGUAGES})
set(SPHINXINTL_LANGUAGE "${SPHINXINTL_LANGUAGE},${lang}")
endforeach()
set(PGR_WORKSHOP_LANGUAGES ${PGR_WORKSHOP_ENGLISH})
endif()
message(STATUS "SPHINXINTL_LANGUAGE ${SPHINXINTL_LANGUAGE}")


#------------------------------------------
# Used to generate the languages bar
#------------------------------------------
MACRO(INSERT_INTO_MAP _KEY _VALUE)
SET("LangMap_${_KEY}" "${_VALUE}")
ENDMACRO(INSERT_INTO_MAP)

INSERT_INTO_MAP("ca" "Català")
INSERT_INTO_MAP("de" "Deutsch")
INSERT_INTO_MAP("el" "Ελληνικά")
INSERT_INTO_MAP("en" "English")
INSERT_INTO_MAP("es" "Español")
INSERT_INTO_MAP("fr" "Français")
INSERT_INTO_MAP("fi" "Suomen kieli")
INSERT_INTO_MAP("hu" "Hungarian")
INSERT_INTO_MAP("id" "Bahasa Indonesia")
INSERT_INTO_MAP("it" "Italiano")
INSERT_INTO_MAP("ja" "日本語")
INSERT_INTO_MAP("ko" "한국어")
INSERT_INTO_MAP("pl" "Polski")
INSERT_INTO_MAP("pt" "Portugus")
INSERT_INTO_MAP("ru" "Русский")
INSERT_INTO_MAP("zh" "中文")


message(STATUS "PGR_WORKSHOP_BUILD_LANGUAGES = ${PGR_WORKSHOP_BUILD_LANGUAGES}")
message(STATUS "SPHINXINTL_LANGUAGE = ${SPHINXINTL_LANGUAGE}")

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

# The list of projects to be documented

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

add_subdirectory(docs)
#------------------------------------------
# Used to generate the languages bar
#------------------------------------------
MACRO(INSERT_INTO_MAP _KEY _VALUE)
SET("LangMap_${_KEY}" "${_VALUE}")
ENDMACRO(INSERT_INTO_MAP)

INSERT_INTO_MAP("ca" "Català")
INSERT_INTO_MAP("de" "Deutsch")
INSERT_INTO_MAP("el" "Ελληνικά")
INSERT_INTO_MAP("en" "English")
INSERT_INTO_MAP("es" "Español")
INSERT_INTO_MAP("fr" "Français")
INSERT_INTO_MAP("fi" "Suomen kieli")
INSERT_INTO_MAP("hu" "Hungarian")
INSERT_INTO_MAP("id" "Bahasa Indonesia")
INSERT_INTO_MAP("it" "Italiano")
INSERT_INTO_MAP("ja" "日本語")
INSERT_INTO_MAP("ko" "한국어")
INSERT_INTO_MAP("pl" "Polski")
INSERT_INTO_MAP("pt" "Portugus")
INSERT_INTO_MAP("ru" "Русский")
INSERT_INTO_MAP("zh" "中文")


message(STATUS "PGR_WORKSHOP_BUILD_LANGUAGES = ${PGR_WORKSHOP_BUILD_LANGUAGES}")
message(STATUS "SPHINXINTL_LANGUAGE = ${SPHINXINTL_LANGUAGE}")

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

# The list of projects to be documented

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

add_subdirectory(docs)
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (LOCALE)
"${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_SOURCE_DIR}/locale/pot"

COMMAND sphinx-intl update -d ${CMAKE_SOURCE_DIR}/locale -l en > locale_changes.txt
COMMAND sphinx-intl update -d ${CMAKE_SOURCE_DIR}/locale -l ${SPHINXINTL_LANGUAGE} > locale_changes.txt
DEPENDS "conf.py"

COMMENT "Generating POT & PO files ..."
Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/chapter-12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ Also a new table containing the vertices information was created:
* Additional columns are for analyzing the topology.

Now we are ready for our first routing query with
:ref:`basic/pedestrian:pgr_dijkstra`
`pgr_dijkstra <https://docs.pgrouting.org/latest/en/pgr_dijkstra.html>`__
or any other pgRouting query.



Analyze and Adjust the Routing Network Topology
Expand Down
2 changes: 1 addition & 1 deletion docs/appendix/appendix-2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To be up-to-date with changes and improvements
sudo apt-get update & sudo apt-get upgrade
To avoid permission denied errors for local users you can set connection method
to ``trust`` in ``/etc/postgresql/<version>/main/pg_hba.conf`` and restart
to ``trust`` in ``/etc/postgresql/<version>/main/pg_hba.conf`` and restart
PostgreSQL server with ``sudo service postgresql restart``.

Following the example with PostgreSQL 10:
Expand Down
2 changes: 1 addition & 1 deletion docs/appendix/appendix-3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ automatically and creates tables for feature types and road classes.
* Documentation: |osm2pgrouting-wiki|

.. note::
There are some limitations, especially regarding the network size. The way to
There are some limitations, especially regarding the network size. The way to
handle large data sets is to current version of osm2pgrouting needs to load
all data into memory, which makes it fast but also requires a lot or memory
for large datasets. An alternative tool to osm2pgrouting without the network
Expand Down
2 changes: 1 addition & 1 deletion docs/basic/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Upload data to the database

The next step is to run ``osm2pgrouting`` converter, which is a command line
tool that inserts the data in the database, "ready" to be used with pgRouting.
Additional information about ``osm2pgrouting`` can be found at the :ref:`osm2pgrouting`
Additional information about ``osm2pgrouting`` can be found at the :doc:`../appendix/appendix-3`

For this step:

Expand Down
2 changes: 1 addition & 1 deletion docs/basic/vehicle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A query for vehicle routing generally differs from routing for pedestrians:
* Euros
* Pesos
* Dollars
* CO\ :sub:`2`\ emissions
* CO\ :sub:`2`\ emissions
* Wear and tear on the vehicle, etc.

* The ``reverse_cost`` attribute must be taken into account on two way streets.
Expand Down
8 changes: 4 additions & 4 deletions docs/general-intro/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Introduction
|pgrouting-web| adds routing functionality to |postgis-web|.

Please see the :doc:`contents <../index>` for full content of
@WORKSHOP_AREA@ workshop. This workshop covers two levels for using
@WORKSHOP_AREA@ workshop. This workshop covers two levels for using
pgRouting: `Basic`_ and `Advanced`_.

Basic
Expand Down Expand Up @@ -59,19 +59,19 @@ Aknowledments
.. image:: /images/logos/paragon.png
:alt: Paragon Corporation
:width: 200
:target: |paragon|
:target: https://www.paragoncorporation.com/

.. image:: /images/logos/erosion.png
:alt: Paragon Corporation
:width: 200
:target: |erosion|
:target: https://www.erosion.dev/

.. rubric:: Developers & presenters of @WORKSHOP_AREA@ workshop:

* *Vicky Vergara* Is a freelance developer from Mexico. She's the core developer
of pgRouting project and GSoC Mentor. OSGeo Charter member.

* *Ramón Ríos* Is a freelance developer from Mexico. Lead engenieer for
* *Ramón Ríos* Is a freelance developer from Mexico. Lead engenieer for
ParkUpFront


Expand Down
2 changes: 1 addition & 1 deletion docs/general-intro/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ every map a silo of data and effort."

(Source: https://wiki.openstreetmap.org/wiki/Press)

OpenStreetMap is an adequate data source for pgRouting, because it has no
OpenStreetMap is an adequate data source for pgRouting, because it has no
technical restrictions in terms of processing the data. Data availability still
varies from country to country, but the worldwide coverage is improving day by
day.
Expand Down
2 changes: 1 addition & 1 deletion docs/interactions/chapter-9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ It is necessaary to select the column that has a distinct unique value:
Format a Routing Layer
===============================================================================

#. Choose a routing view, :menuselection:`Right click --> Zoom to Layer`
#. Choose a routing view, :menuselection:`Right click --> Zoom to Layer`

.. image:: images/chap_QGIS/qgis9.png
:height: 50pt
Expand Down
4 changes: 1 addition & 3 deletions docs/un_sdg/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ To connect to the database, type the following in the terminal.
Bangladesh database
===============================================================================

Now download the data for an area in Bangladesh by following the same steps like
Now download the data for an area in Bangladesh by following the same steps like
that of Mumbai.

Create Bangladesh area database compatible with pgRouting
Expand Down Expand Up @@ -232,8 +232,6 @@ Bangladesh.
:language: bash
:linenos:

See :ref:`basic/data:Option 3) Download using Overpass XAPI`

Upload Bangladesh data to the database
-------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit ee5b1b7

Please sign in to comment.