How do you trackback how a Term in a Weblate component was introduced to the database?
One term (“Stamen”) appears as term #27 in the Gramps glossary component.
The only occurrence of Stamen that I recall in Gramps is as a proper noun: the name of the Stamen Map tile provider. And, as a name, it needs no translating. So it seems reasonable to backtrack it to where the term was mismarked in the source code as ‘translatable’. But what is the way to start that backtracking?
Likewise, there are a set of 12 Hebrew month names in that weblate component. (Unlike the ‘Stamen’ maps, month names do need localization.) But there are no other month names in this component. So it seems like they should have found their way into another Weblate component other than the Glossary. So how do we backtrack how they were introduced into the system.
Search in the *.pot file. For instance, if I go to the addons-source repo,
grep -i stamen addons.pot
I see that the Heatmap addon use Stamen. Then looking at the code in an editor:
#: Heatmap/utils.py:55
msgid "Stamen Terrain"
msgstr ""
#: Heatmap/utils.py:58
msgid "Stamen Terrain (Background only)"
msgstr ""
#: Heatmap/utils.py:61
msgid "Stamen Toner"
msgstr ""
#: Heatmap/utils.py:64
msgid "Stamen Watercolor"
msgstr ""
Looking at the source tree gramps.pot, there are also occurrences in the narrativeweb.
#: ../gramps/plugins/webreport/narrativeweb.py:2653
msgid "Stamen Map"
msgstr ""
#: ../gramps/plugins/webreport/narrativeweb.py:2739
msgid "Stamen Option"
msgstr ""
#: ../gramps/plugins/webreport/narrativeweb.py:2744
msgid ""
"Select which option that you would like to have for the Stamen map map-"
"pages..."
msgstr ""
#: ../gramps/plugins/webreport/narrativeweb.py:2749
msgid "Stamen maps API key"
msgstr ""
#: ../gramps/plugins/webreport/narrativeweb.py:2767
msgid ""
"Copy and paste this value in your browser.\n"
"The Stamen maps service must be selected."
msgstr ""
Those Heatmap addon translatable strings contain the “Stamen” word inside a larger string rather than the word alone. And the Gramps core application has the same for the gramps/plugins/webreport/narrativeweb.py. They are not the single Word by itself.
Also, the those translations are (respectively) collated in the Gramps Addons component and the Gramps Program component. They are not in the Gramps Glossary component.
Look in the “History” tab in Weblate. The source string “Stamen” was added by Mirko Leonhäuser on 22 Aug 2023 with the terminology flag.
1 Like
Love grep. While the following may not correlate directly to weblate, git also provides a very useful grep function which searches a local repo, and takes arguments such as a tag as shown here:
> git grep "Stamen" v5.1.0
No response with the above so Gramps v5.0.0 did not contain Stamen, but Gramps v5.1.1 did:
> git grep "Stamen" v5.1.1
v5.1.1:po/fr.po:# StamenMap est une marque commerciale
v5.1.1:po/fr.po:#~ msgid "StamenMap"
v5.1.1:po/fr.po:#~ msgstr "StamenMap"
v5.1.1:po/fr.po:#~ msgid "Stamen Option"
v5.1.1:po/fr.po:#~ msgstr "Option Stamen"
v5.1.1:po/fr.po:#~ "Select which option that you would like to have for the Stamenmap Map "
v5.1.1:po/fr.po:#~ "cartographiques Stamenmap..."
Required manual bisection method between v6.0.6 and v4.0.0 to get to v5.1.1 but still quite fast. And given git has so much capability built-in, there might be a better way to get at it faster.