#2 other test pr
Opened 2 years ago by darknao. Modified 2 years ago

file modified
+5 -2
@@ -27,7 +27,7 @@ 

  		fi   \

  	fi

  

- all:: $(LANGUAGES)

+ all:: en $(LANGUAGES)

  	cp static/robots.txt out/

  

  static:
@@ -44,6 +44,9 @@ 

  for me to get its name.. Please use a wise name."

  endif

  

+ po/en.po: pot

+ 	msginit -i $(POT_FILE) --no-translator -l en -o po/en.po

+ 

  data/templates/translations.html: po/LINGUAS

  	$(PYTHON) $(BUILDDIR)/construct-translations.py $(BUILDDIR)/translations.ini $^ $@

  
@@ -59,7 +62,7 @@ 

  	rm -rf $(TRANS_TMP)

  

  pullpos:

- 	git clone ssh://git@pagure.io/fedora-web/translations.git $(TRANS_TMP)

+ 	git clone https://pagure.io/fedora-web/translations.git $(TRANS_TMP)

  	cp -R $(TRANS_TMP)/$(TRANS_FOLDER)/*.po ./po/

  	cp -R $(TRANS_TMP)/$(TRANS_FOLDER)/LINGUAS ./po/

  	rm -rf $(TRANS_TMP)

@@ -1,5 +1,5 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,5 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,8 @@ 

  include ../Makefile.in

  

+ # retired

+ pullpos: ;

+ 

  $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,8 @@ 

  include ../Makefile.in

  

+ # no translation

+ pullpos: ;

+ 

  $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

file modified
+1 -1
@@ -1,7 +1,7 @@ 

  #!/usr/bin/python

  import sys

  

- languages = []

+ languages = [("en", "en"),]

  

  linguasfile = sys.argv[1]

  linguas = open(linguasfile)

@@ -1,6 +1,7 @@ 

  #!/bin/env python

  

  import ConfigParser, sys, os

+ import langtable

  

  '''

  This script takes the contents of the website-specific LINGUAS file, constructs an options menu for the languages contained therein.
@@ -40,7 +41,8 @@ 

                  lang = lang.strip()

                  if lang and not lang.startswith('#') and not lang in banned:

                      #output.write('    <option value="' + lang + '" py:attrs="{\'selected\': lang == \'' + lang + '\' and \'selected\' or None}">' + language_map.get('Languages',lang) + '</option>\n')

-                     output.write(", '"+lang+"': '"+language_map.get('Languages',lang)+"'")

+                     #output.write(", '"+lang+"': '"+language_map.get('Languages',lang)+"'")

+                     output.write(", '"+lang+"': '"+langtable.language_name(languageId=lang).encode('utf-8')+"'")

          finally:

              linguas.close()

          output.write("""}

file modified
+1 -1
@@ -1,5 +1,5 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,8 @@ 

  include ../Makefile.in

  

+ # retired? 

+ pullpos: ;

+ 

  $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,8 @@ 

  include ../Makefile.in

  

+ # Not translated, yet

+ pullpos: ;

+ 

  $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

file modified
+3
@@ -1,5 +1,8 @@ 

  include ../Makefile.in

  

+ # moved (see fedora-web/websites)

+ pullpos: ;

+ 

  $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,5 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,5 +1,5 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

@@ -1,8 +1,9 @@ 

  include ../Makefile.in

  

- $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

+ en $(LANGUAGES): % : | static rss-cache po/%.mo data/templates/translations.html

  	$(PYTHON) $(BUILDDIR)/build.py -o out -i data/content -l $@ -p po -b $(BASEPATH)

  

  rss-cache:

  	@echo Caching Magazine Feed...

- 	$(PYTHON) $(PWD)/build/magfeed.py -o out -s static -b $(BASEPATH) 

\ No newline at end of file

+ 	$(PYTHON) $(PWD)/build/magfeed.py -o out -s static -b $(BASEPATH)

+