Overview
| Comment: | [build][fr] remove dead code for old Firefox extension | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | fr | build | 
| Files: | files | file ages | folders | 
| SHA3-256: | 
be90ac87046d0309fd5b0965ea444757 | 
| User & Date: | olr on 2018-08-20 08:08:44 | 
| Other Links: | manifest | tags | 
Context
| 
   2018-08-20 
 | ||
| 09:48 | [fr] màj du dictionnaire Hunspell check-in: 9247b2625d user: olr tags: trunk, fr | |
| 08:08 | [build][fr] remove dead code for old Firefox extension check-in: be90ac8704 user: olr tags: trunk, fr, build | |
| 08:00 | [fx] remove old Firefox extension from source check-in: 8bb3b9bc37 user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/build.py from [039403a815] to [c2d27a1c07].
1 2 3 4 5 6 7 8 9 10 11 12  | 
# Builder for French language
import os
import platform
import zipfile
from distutils import dir_util, file_util
import helpers
def build (sLang, dVars, spLangPack):
    "complementary build launched from make.py"
 | <  | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  | 
# Builder for French language
import os
import platform
import zipfile
from distutils import dir_util, file_util
import helpers
def build (sLang, dVars, spLangPack):
    "complementary build launched from make.py"
    createWebExtension(sLang, dVars)
    createThunderbirdExtension(sLang, dVars, spLangPack)
def createWebExtension (sLang, dVars):
    "create Web-extension"
    print("Building WebExtension")
 | 
| ︙ | ︙ | |||
34 35 36 37 38 39 40  | 
        sHTML += f'\n<div id="subsection_{sSection}" class="opt_subsection">\n  <h2 data-l10n-id="option_{sSection}">{dVars["dOptLabel"][sLang][sSection][0]}</h2>\n'
        for lLineOpt in lOpt:
            for sOpt in lLineOpt:
                sHTML += f'  <p><input type="checkbox" id="option_{sOpt}" class="gc_option" data-option="{sOpt}"/><label id="option_label_{sOpt}" for="option_{sOpt}" data-l10n-id="option_{sOpt}">{dVars["dOptLabel"][sLang][sOpt][0]}</label></p>\n'
        sHTML += '</div>\n'
    return sHTML
 | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <  | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58  | 
        sHTML += f'\n<div id="subsection_{sSection}" class="opt_subsection">\n  <h2 data-l10n-id="option_{sSection}">{dVars["dOptLabel"][sLang][sSection][0]}</h2>\n'
        for lLineOpt in lOpt:
            for sOpt in lLineOpt:
                sHTML += f'  <p><input type="checkbox" id="option_{sOpt}" class="gc_option" data-option="{sOpt}"/><label id="option_label_{sOpt}" for="option_{sOpt}" data-l10n-id="option_{sOpt}">{dVars["dOptLabel"][sLang][sOpt][0]}</label></p>\n'
        sHTML += '</div>\n'
    return sHTML
def createThunderbirdExtension (sLang, dVars, spLangPack):
    "create extension for Thunderbird"
    print("Building extension for Thunderbird")
    sExtensionName = dVars['tb_identifier'] + "-v" + dVars['version'] + '.xpi'
    spfZip = "_build/" + sExtensionName
    hZip = zipfile.ZipFile(spfZip, mode='w', compression=zipfile.ZIP_DEFLATED)
    _copyGrammalecteJSPackageInZipFile(hZip, spLangPack)
    for spf in ["LICENSE.txt", "LICENSE.fr.txt"]:
        hZip.write(spf)
    dVars = _createOptionsForThunderbird(dVars)
    helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/tb", "", dVars, True)
    hZip.close()
    spDebugProfile = dVars['win_tb_debug_extension_path']  if platform.system() == "Windows"  else dVars['linux_tb_debug_extension_path']
    helpers.unzip(spfZip, spDebugProfile)
    spfBetaExtension = dVars['win_tb_beta_extension_filepath']  if platform.system() == "Windows"  else dVars['linux_tb_beta_extension_filepath']
    #helpers.unzip(spfZip, spBetaProfile)
    file_util.copy_file(spfZip, spfBetaExtension)
 | 
| ︙ | ︙ |