Commit Graph

5819 Commits

Author SHA1 Message Date
3d-gussner
7162b224a7 Fix Mk2.5/S zip after change PO-based language translation support
Limit atmegaMK404 boards mem to 8,16,32
2022-07-01 08:26:56 +02:00
3d-gussner
96b9048229
Merge pull request #3519 from wavexx/xflash_errors
Correctly show XFLASH initialization errors
2022-06-30 08:16:32 +02:00
Yuri D'Elia
af9daecf5b Correctly show XFLASH initialization errors
Remove the first serial message, which cannot be displayed since serial
is not available yet.

Move both the serial message and display after
serial/temperature/planner is setup, so that we can use
lcd_show_fullscreen_message_and_wait_P properly.
2022-06-29 11:44:53 +02:00
3d-gussner
f3adb781a1
Merge pull request #3457 from wavexx/remove_runout_support
Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
2022-06-29 08:16:31 +02:00
3d-gussner
4d8222cc1f
Merge pull request #3516 from wavexx/unbreak_elm_qdirstat
Include missing "re" module for elf_mem_map
2022-06-24 13:40:58 +02:00
Yuri D'Elia
88f05cc1f1 Include missing "re" module for elf_mem_map
"re" is required by the --qdirstat flag, and has been incorrectly
removed.
2022-06-23 14:20:07 +02:00
3d-gussner
0af88574fb Update to Arduino_boards version 1.0.5-1 2022-06-20 17:04:58 +02:00
3d-gussner
81a8418dd6 C++17 Arduino_boards version 1.0.5-1 2022-06-20 17:02:30 +02:00
3d-gussner
a01c19cade Change backup suffix from ~ to .bak 2022-06-20 17:00:42 +02:00
3d-gussner
f10981099d
Merge pull request #3500 from 3d-gussner/gnu++17
GNU++17 Arduino_boards version 1.0.5-1
2022-06-20 14:24:10 +02:00
3d-gussner
881e2964e0 Update to Arduino_boards version 1.0.5-1 2022-06-20 11:16:11 +02:00
Yuri D'Elia
0d7680dbf7
New PO-based language translation support (#3471)
* lang: Add a PO language extractor with FW metadata support

Implement a straight-to-po language extractor which supports our custom
language requirements:

- _i/_I/ISTR for text string definitions
- _T for catalog translations (with back-reference support)
- //// EOL comments with:
  - MSG_ catalog entry name identifiers
  - c=X r=Y annotations for screen dimensioning checks
- Crude support for commented lines

All source locations are correctly referenced in the PO, with the
metadata colleted in the comment for further processing.

Several checks are implemented already during extraction:

- Correct catalog name assignment (no duplicates)
- Metadata checks for each entry

Further checks will be implemented by directly checking the translated PO file.

Requires "polib" and "regex" python modules.

* lang: Adapt lang-check to work directly on PO/POT files

* lang: Allow lang-extract to generate stable (pre-sorted) output directly

* lang: Further extend lang-extract consistency/error checking

- Do not parse inside preprocessor conditionals
- Distinguish between references and definitions
- Warn about missing references and definitions

* lang: lang-extract: warn about incorrect PROGMEM assignments

Check that ISTR is used along with PROGMEM_I1 in an attempt to spot
useless translated catalogs.

* lang: lang-extract: Improved handling of same-line translations

Correctly reference metadata on same-line translations.

* lang: lang-extract: Handle _O as a cat-ref

https://github.com/prusa3d/Prusa-Firmware/pull/3434

* lang: lang-extract: Warn about unused catalog definitions

* lang: lang-extract: Allow propagating translation comments via //

The definition:

    code //// definition [// comment]

will check [definition] as before, but blindly accumulate // comment.
The comment is then re-appended back into the PO files for translators
with the form:

    definition
    comment
    comment...

* lang: Fix incorrect display definitions

* lang: lang-extract: Check source encoding/charmap

* lang: Translate the degree symbol

* lang: Unbreak/cleanup DEBUG_SEC_LANG

* lang: Improve meaning of comment

* lang: Split charset conversions into an aux lib for future use

* lang: Implement lang-map.py to extract the translation symbol map

- Extracts the translatable symbol map for further use
- Computes a stable "language signature" from the map itself
- Optionally patches the binary update the symbols

* lang: Check for translation recoding problems

* lang: Implement a transliteration map to post-process translations

TRANS_CHARS is now used to replace unavailable symbols to the source
encoding, only while producing the language catalog.

* lang: Handle/check character replacements in lang-check

Filter the translation through TRANS_CHARS, so that the preview and
length check are performed correctly for expanding replacements such as
'ß' to 'ss'.

* lang: Implement lang-build.py to generate the final language catalog

* Cleanup .gitignore

* lang: Drop txt language files

* lang: Remove outdated translation scripts and obsolete docs

* lang: Update build scripts for new infrastructure

* lang: [no] Integrate accents from po/new/no.po

We now support accents natively

* lang: Remove redundant directory po/new/

* lang: Fix encoding of LCD characters in PO files

* lang: [hr] Fix wrapping in MSG_CRASH_DET_ONLY_IN_NORMAL

* lang: Sort and reformat PO files for further massaging

* lang: Switch to developer (dot) comments for PO metadata

* lang: Allow the IGNORE annotation to skip extraction

* lang: Fix missing/broken language metadata in sources

* lang: Add update-pot.sh and regenerate po/Firmware.pot

* lang: Add update-po.sh and refresh all PO files

* lang: Add summary documentation about the new translation workflow

* Add more ignored files

* CI: Add new required dependencies to travis

* lang: lang-build: Improve warning message

"referenced" was really meaning that data is being duplicated.

* lang: Respect the language order as defined in config.sh

This correctly splits normal and community-made entries during language
selection.

* lang: More typos in the documentation

* lang: Check for the maximum size of each language

Each table needs to fit within LANG_SIZE_RESERVED

* lang: Properly align _SEC_LANG to page boundaries

... instead of relying on _SEC_LANG_TABLE to calculate the offset

* lang: Build support for dual-language hex files

Detect the printer type by checking the current variant type.

On printers with no xflash (MK2*), generate one hex file for each
additional language file by patching the built-in secondary language
table during the build process

* lang: Mention lang-patchsec.py

* lang: Use color() instead of tput for clarity

* lang: Allow disabling terminal colors with NO_COLOR/TERM=dumb

* lang: Consistent use of redirection in config.sh

* lang: Stricter variant-type check for xflash support

* lang: Output size stats when building double-language hex files

* lang: Respect NO_COLOR in lang-check.py

* lang: Check for repeated/incorrect annotations

Catch errors such as "c=1 c=2"

* lang: Correct MSG_SLIGHT_SKEW/MSG_SEVERE_SKEW annotations

* lang: [it] Improve MSG_*_SKEW translation

* lang: Use INTLHEX instead of OUTHEX_P/S for configuration

We already have OUTHEX which is the compiled firmware.

Use INTLHEX for the final internationalized firmware, which is less
confusing. Also, assume it being a prefix for all generated hex
files, which reduces the number of variables set.

* lang: Move lang_map to lib.io for further use

* lang: lang-check: Accept a firmware map file to suppress unused string warnings

* lang: Use the map file to reduce useless warnings during fw-build

* lang: lang-check: Also suppress unused empty annotations

* lang: Fix MSG_MOVE_CARRIAGE_TO_THE_TOP_Z annotation

Refresh pot file

* lang: lang-check: Do not warn about same-word translations by default

Do not warn when one-word translations such as "No" result in "No" also
in other languages, since this is common in latin languages.

Allow to re-enable the warning with --warn-same

* lang: lang-build: Handle same-source/translation efficiently

* lang: [it] Explicitly add On/Off/Reset/Wizard to suppress warnings

Instead of displaying a warning, supress the warning and explicitly
translate each entry using english (which is the common/acceptable
word in these cases).

* lang: [it] Suppress more warnings

* lang: lang-check: Add intermediate "suggest" warning category

Warnings in the "suggest" category as shown as [S] as based on pure
speculation from the checking tool, such as the translation being
significantly shorter than the original.

As a result, they can be suppressed with --no-suggest

* lang: Return translation status from lang-check

- 0 if the translation only contains suggestions
- 1 if the translation contains warnings or errors

Check for the exit status in fw-build.sh, but do nothing at the moment
except printing a non-fatal error.

* lang: Remove "trim_trailing_whitespace=false" for po files

PO files got cleaned up/rewritten. We can now ensure they stay
consistent.

* lang: [sv] Re-integrate changes from 70c73cb

* lang: [no] Reintegrate changes from @pkg2000
2022-06-16 15:03:30 +02:00
3d-gussner
880853650d
Version changed (3.11.1-RC1 build 4987) 2022-06-13 12:03:48 +02:00
3d-gussner
38081f0a30
Merge pull request #3505 from 3d-gussner/MK3_3.11.1_Pre-release
Pre-release FW3.11.1
2022-05-24 16:27:15 +02:00
3d-gussner
53046ffeee Update diacritics in Swedish and Norwegian Firmware_xx.po files 2022-05-24 09:06:46 +02:00
3d-gussner
44eb9d4ff9 Updated Norwegian files 2022-05-24 08:27:12 +02:00
3d-gussner
d3df8389ef Merge branch 'MK3_3.11.1_Pre-release' of https://github.com/3d-gussner/Prusa-Firmware into MK3_3.11.1_Pre-release 2022-05-24 08:15:04 +02:00
3d-gussner
70c73cbf6b Pre-release po file update 2022-05-24 08:14:24 +02:00
DRracer
75521dca2e
Merge pull request #3509 from prusa3d/MK3_3.11.1-Activate_Norwegian
Activate Norwegian community translation
2022-05-24 08:11:17 +02:00
DRracer
aa59d9b5eb
Merge pull request #3508 from 3d-gussner/MK3_3.11.1_Norwegian
Update Norwegian community translation PFW-1296 (fixed)
2022-05-24 08:06:03 +02:00
3d-gussner
1a4bbb4918
Activate Norwegian community translation 2022-05-24 07:51:05 +02:00
3d-gussner
3ae4b6d329 Merge remote-tracking branch 'pkg2000/MK3_3.11.0' into HEAD
Fix merge issues and POEdit double `\\` to `\`
Update `lang_en_no.txt`
Enable Norwegian translation in `config.h`

Tested on MK404 MK3S
2022-05-24 07:28:10 +02:00
3d-gussner
4cd5777380 Pre-release po file update 2022-05-23 19:51:35 +02:00
Guðni Már Gilbert
65d500f2ed Simplify printer_smodel_check
Saves 140 bytes of flash and 4 bytes of SRAM
2022-05-22 17:57:47 +00:00
3d-gussner
dc66a773f1 C++17 Arduino_boards version 1.0.5-1 2022-05-19 09:24:21 +02:00
Yuri D'Elia
d53eb69150 Manually cast to int when comparing against extrude_min_temp
Avoid the automatic conversion to float to improve code size.
2022-05-12 12:20:54 +02:00
Yuri D'Elia
a8c48cdaef
Merge pull request #3493 from wavexx/unused_notice
Add notices about Sheet::bed_temp and Sheet::pinda_temp being unused
2022-05-11 21:41:13 +02:00
Yuri D'Elia
ea46402e4d Replace EXTRUDE_MINTEMP with the configurable extrude_min_temp
Everywhere MINTEMP is checked, use the configurable value set by M302,
not an hardcoded value.

EXTRUDE_MINTEMP is now used only as the initial default value.

Reduce the precision of extrude_min_temp to an integer to reduce the
generated code size (constant folding did in fact do the same previously
anyway). Having tenths of degrees is not necessary for this feature.
2022-05-11 20:07:38 +02:00
Yuri D'Elia
64f646a8a4 Add notices about Sheet::bed_temp and Sheet::pinda_temp being unused
There is a potential for 2*8 bytes of extra sparse eeprom space, plus a
few bytes saved if we remove the update calls, so add a notice that
these values are currently only written-to, but never actually used.
2022-05-11 11:15:36 +02:00
Alex Voinea
37e1c11099
Merge pull request #2657 from FormerLurker/MK3
Add arc interpolation features (G2/G3) and M214 command for controlling settings
2022-05-02 11:05:51 +03:00
Alex Voinea
7515db1ef0 Adjust comments 2022-05-02 10:02:00 +02:00
3d-gussner
554bb02ac1
Merge pull request #3487 from wavexx/mk404_build_gcc
Accept any gcc version to build MK404
2022-05-02 08:04:54 +02:00
Yuri D'Elia
4a10dfa68f Accept any gcc version to build MK404
Restricting the MK404 build to gcc-7 is not a good idea, since gcc-7 is
already not available in several newer distributions.

Just pick the current gcc version.

Current gcc 10 versions build MK404 correctly.
2022-04-30 23:17:33 +02:00
Alex Voinea
0b23ccdee9 Abort arc on planner hard stop 2022-04-29 20:38:48 +02:00
Yuri D'Elia
5b3441b2bd Fix AMBIENT_RAW_*_TEMP define names
The max/min temperature check were incorrectly using
HEATER_AMBIENT_RAW_*_TEMP (non-existing) instead of the correct
AMBIENT_RAW_*_TEMP (this is not a heater afterall).

This doesn't change the current behavior, since the check defaulted to
the correct path for the MK3+ configuration anyway.
2022-04-29 16:54:39 +02:00
FormerLurker
bb33c76d2b Fix and simplify M214 data types and default config initialization. 2022-04-28 14:36:51 +02:00
FormerLurker
02b0307307 Code Cleanup 2022-04-28 14:36:51 +02:00
FormerLurker
623c029bfa Code cleanup to reduce program storage 2022-04-28 14:36:51 +02:00
FormerLurker
acc234b0c5 Fix config store load (was missing n_arc_correction). 2022-04-28 14:36:51 +02:00
FormerLurker
3880777691 Fix invalid bool compare. 2022-04-28 14:36:51 +02:00
FormerLurker
6fc8155cbe Add n_arc_correction and enhanced small angle sin/cos approximation. 2022-04-28 14:36:51 +02:00
FormerLurker
58d9916d54 Make suggested corrections. 2022-04-28 14:36:51 +02:00
FormerLurker
4aa5a75301 Enhance arc interpolation and add M214 for controlling arc interpolation settings. 2022-04-28 14:36:51 +02:00
Jakub Dolezal
f893d93d63
Merge pull request #3472 from 3d-gussner/PFW-1306_help_prusa3d_com
PFW-1306 help.prusa3d.com
2022-04-26 10:38:33 +02:00
Alex Voinea
e3f48ead9f
Merge pull request #3440 from gudnimg/optimise-checkFanSpeed
Optimise `checkFanSpeed()` Flash use
2022-04-21 14:04:23 +02:00
Alex Voinea
d860d61513
Merge pull request #3459 from gudnimg/remove_pid_add_extrusion_rate
Remove unused setting `PID_ADD_EXTRUSION_RATE`
2022-04-21 14:01:50 +02:00
Alex Voinea
d4d8149c9b
Merge pull request #3438 from leptun/MK3_reset_acceleration_rates_on_steps_per_mm_change
Reset acceleration rates when changing microstepping resolution
2022-04-21 13:59:55 +02:00
Alex Voinea
a4887b542f
Merge pull request #3467 from gudnimg/autostart_stilltocheck-optimisation
Optimise `autostart_stilltocheck` variable
2022-04-21 13:57:02 +02:00
Alex Voinea
453e2f102a
Merge pull request #3474 from leptun/MK3_xflash_upload_screen
XFlash upload message
2022-04-21 13:52:47 +02:00
pkg2000
a319e32c7e Update no.po
hah, can you believe it. In Extruder info, nozzle fan is the extruder fan..
2022-04-20 17:30:02 +02:00