Skip to content

I've added initial Turkish language support for the console and keybo… #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

rkarahan80
Copy link

@rkarahan80 rkarahan80 commented Jun 12, 2025

…ard.

This change introduces Turkish localization primarily for the syscons environment.

Key changes include:

  1. Console Screen Maps:

    • I added iso-8859-9_to_cp437.scr and iso-8859-9_to_vga.scr to share/syscons/scrnmaps/. These maps facilitate the display of Turkish characters (ISO 8859-9) on common console emulations like CP437 and VGA by mapping them to the closest available characters.
    • I updated share/syscons/scrnmaps/Makefile to include these new screen maps.
    • Note: Specific Turkish console fonts could not be added due to limitations in accessing external resources during development.
  2. Keyboard Layouts:

    • I verified the existing Turkish Q keyboard layout (tr.iso9.q.kbd) in share/syscons/keymaps/.
    • I created and added a new Turkish F keyboard layout (tr.iso9.f.kbd) to share/syscons/keymaps/ by adapting the Q layout to F layout specifications.
    • I updated share/syscons/keymaps/Makefile to include the new Turkish F keyboard layout.
  3. Configuration Instructions:

    • I investigated system boot configuration and determined that EFI boot files are not the place to configure syscons.
    • Since /etc/rc.conf (the standard place for syscons configuration) is not part of this source repository, direct modification was not possible.
    • I created turkish_syscons_setup.txt in the repository root. This file provides instructions for you on how to manually configure your system's /etc/rc.conf to use the new Turkish keymap and screenmap, and how to switch keyboard layouts dynamically.

The changes focus on providing the necessary files and guidance for you to enable Turkish language support once the FreeBSD kernel is booted and syscons is active. I recommend you test these changes in a live environment to ensure full functionality and identify any display issues due to the absence of specific Turkish fonts.

Summary by Sourcery

Add initial Turkish localization to the syscons console by providing new screen maps, a Turkish F keyboard layout, and setup instructions

New Features:

  • Introduce ISO-8859-9 console screen maps for CP437 and VGA to support Turkish characters
  • Add a Turkish F keyboard layout alongside the existing Turkish Q layout

Enhancements:

  • Update syscons keymaps and scrnmaps Makefiles to include the new Turkish files

Documentation:

  • Add a setup guide for configuring Turkish keymaps and screenmaps in /etc/rc.conf

…ard.

This change introduces Turkish localization primarily for the syscons environment.

Key changes include:

1.  **Console Screen Maps:**
    - I added `iso-8859-9_to_cp437.scr` and `iso-8859-9_to_vga.scr` to `share/syscons/scrnmaps/`. These maps facilitate the display of Turkish characters (ISO 8859-9) on common console emulations like CP437 and VGA by mapping them to the closest available characters.
    - I updated `share/syscons/scrnmaps/Makefile` to include these new screen maps.
    - Note: Specific Turkish console fonts could not be added due to limitations in accessing external resources during development.

2.  **Keyboard Layouts:**
    - I verified the existing Turkish Q keyboard layout (`tr.iso9.q.kbd`) in `share/syscons/keymaps/`.
    - I created and added a new Turkish F keyboard layout (`tr.iso9.f.kbd`) to `share/syscons/keymaps/` by adapting the Q layout to F layout specifications.
    - I updated `share/syscons/keymaps/Makefile` to include the new Turkish F keyboard layout.

3.  **Configuration Instructions:**
    - I investigated system boot configuration and determined that EFI boot files are not the place to configure syscons.
    - Since `/etc/rc.conf` (the standard place for syscons configuration) is not part of this source repository, direct modification was not possible.
    - I created `turkish_syscons_setup.txt` in the repository root. This file provides instructions for you on how to manually configure your system's `/etc/rc.conf` to use the new Turkish keymap and screenmap, and how to switch keyboard layouts dynamically.

The changes focus on providing the necessary files and guidance for you to enable Turkish language support once the FreeBSD kernel is booted and `syscons` is active. I recommend you test these changes in a live environment to ensure full functionality and identify any display issues due to the absence of specific Turkish fonts.
@rkarahan80 rkarahan80 requested review from a team as code owners June 12, 2025 05:20
@ghostbsd-bot
Copy link

Can one of the admins verify this patch?

Copy link

sourcery-ai bot commented Jun 12, 2025

Reviewer's Guide

Introduce initial Turkish localization support for syscons by adding ISO-8859-9 screen maps, a new F-layout keyboard map, and accompanying setup instructions.

File-Level Changes

Change Details Files
Added Turkish console screen maps and updated scrnmaps Makefile
  • Created iso-8859-9_to_cp437.scr map
  • Created iso-8859-9_to_vga.scr map
  • Included new maps in scrnmaps Makefile
share/syscons/scrnmaps/iso-8859-9_to_cp437.scr
share/syscons/scrnmaps/iso-8859-9_to_vga.scr
share/syscons/scrnmaps/Makefile
Introduced Turkish F keyboard layout and amended keymaps Makefile
  • Created tr.iso9.f.kbd adapted from existing Q layout
  • Verified presence of tr.iso9.q.kbd
  • Updated keymaps Makefile to include F layout
share/syscons/keymaps/tr.iso9.f.kbd
share/syscons/keymaps/Makefile
Provided manual syscons configuration instructions
  • Added turkish_syscons_setup.txt with rc.conf configuration steps
  • Documented dynamic keyboard layout switching
turkish_syscons_setup.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rkarahan80
Copy link
Author

@sourcery-ai review

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rkarahan80 - I've reviewed your changes - here's some feedback:

  • The new scrnmap files use a .scr extension but existing maps use .scm—please align the file extensions to avoid consistency issues.
  • Alphabetize the new entries in both Makefiles (keymaps and scrnmaps) so they stay in order with the rest of the files.
  • Move turkish_syscons_setup.txt into the repository’s docs or share/doc folder to keep setup instructions alongside other documentation.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

* You can either reboot your system.
* Or, for immediate effect without rebooting (for keyboard and screen map):
* Load the keyboard layout: `kbdcontrol -l tr.iso9.q` (or `tr.iso9.f`)
* Load the screen map: `vidcontrol -l iso-8859-9_to_vga`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Include example for applying the alternative screen map iso-8859-9_to_cp437.

Please update the immediate command example to include vidcontrol -l iso-8859-9_to_cp437 for consistency with the rc.conf section.

…along with a setup guide:

```
Add Turkish console and keyboard support with setup guide.

This commit provides files and configuration guidance for Turkish language
support within the syscons console environment.

Changes include:

1.  **Console Screen Maps:**
    - Added screen map source files:
        - `share/syscons/scrnmaps/iso-8859-9_to_cp437.scr`
        - `share/syscons/scrnmaps/iso-8859-9_to_vga.scr`
    - These maps facilitate the display of Turkish characters (ISO 8859-9)
      by mapping them to characters available in CP437 and VGA console
      character sets.
    - Updated `share/syscons/scrnmaps/Makefile` to ensure these `.scr`
      files are processed into `.scm` files (e.g., `iso-8859-9_to_vga.scm`)
      for use by `syscons`.
    - (Note: Specific Turkish console fonts were not added due to
      limitations in accessing external resources.)

2.  **Keyboard Layouts:**
    - Verified the existing Turkish Q keyboard layout:
      `share/syscons/keymaps/tr.iso9.q.kbd`.
    - Created and added a new Turkish F keyboard layout:
      `share/syscons/keymaps/tr.iso9.f.kbd`. This was done by adapting
      the Turkish Q layout to standard Turkish F keyboard specifications.
    - Updated `share/syscons/keymaps/Makefile` to include the new
      Turkish F keyboard layout.

3.  **Configuration Instructions:**
    - Created `turkish_syscons_setup.txt` in the repository root.
    - This file provides instructions for you on how to manually
      configure your system's `/etc/rc.conf` (or `/etc/rc.conf.local`)
      to use the Turkish keymap (e.g., `keymap="tr.iso9.q"`) and
      screenmap (e.g., `scrnmap="iso-8859-9_to_vga"`).
    - It also includes instructions on how to switch keyboard layouts
      dynamically after boot using `kbdcontrol`.

Testing of these changes in a live syscons environment is recommended
to confirm full functionality.
```
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rkarahan80 - I've reviewed your changes - here's some feedback:

  • Ensure your new screen map files use the existing “.scm” extension (not “.scr”) so they follow the naming conventions in share/syscons/scrnmaps/ and update the Makefile accordingly.
  • Move turkish_syscons_setup.txt into a docs subdirectory (e.g. share/doc/syscons/) so setup instructions live alongside other syscons documentation.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

* You can either reboot your system.
* Or, for immediate effect without rebooting (for keyboard and screen map):
* Load the keyboard layout: `kbdcontrol -l tr.iso9.q` (or `tr.iso9.f`)
* Load the screen map: `vidcontrol -l iso-8859-9_to_vga`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider mentioning the alternative screen map for consistency and completeness.

Add '(or iso-8859-9_to_cp437)' after the screen map command for consistency with the keyboard layout example.

Suggested change
* Load the screen map: `vidcontrol -l iso-8859-9_to_vga`
* Load the screen map: `vidcontrol -l iso-8859-9_to_vga` (or `iso-8859-9_to_cp437`)

@rkarahan80
Copy link
Author

rkarahan80 commented Jun 12, 2025 via email

@rkarahan80
Copy link
Author

rkarahan80 commented Jun 12, 2025 via email

@rkarahan80 rkarahan80 closed this by deleting the head repository Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants