Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 24 Jun 2017, 15:30
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Chinese Language Pets
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 26 of 28 [419 Posts]   Goto page: Previous 1, 2, 3, ..., 24, 25, 26, 27, 28 Next
Author Message
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Sat 14 Jan 2017, 22:00    Post subject: Chinese language pets
Subject description: how to invoke fcitx or scim on Puppy
 

1. How to invoke fcitx and scim on Puppy

a. run a Puppy linux English system on your pc (e.g. fd- fatdog64 7.1.0 or jlh - just lighthouse 7.0.2.b2 )

b. download and install the appropriate fcitx or scim pets or txzes
for fd, its either
fd64-7.0.1-fcitx64_4.2.7-en-zh-raring-13.0.3.txz or
fd64-7.0.1-scim64_1.4.14-en-zh-raring-13.0.3.txz
for jlh, its either
fcitx64_4.2.7-en-zh-raring-13.1.1.pet or
scim64_1.4.14-en-zh-raring-13.1.1.pet

c. install the pet/txz on your Puppy English system
i. for txz, mouse right click on the txz file, select install, confirm ok all the way
ii. for pet, mouse double left click on the pet file, confirm ok all the way

d. when the installation process under c is finished, restart X windows
either
menu, shutdown, restart X server, confirm ok; or
open terminal, type "restartwm", press return
for half-Chinese pets 12.x.x and 13.x.x with x.x at or above 1.0, this restart X step is automatic, so for jlh installing 13.1.1.pets, it will be done by the system automatically.

e. after system has restart X windows, open an application allowing user input (geany, leafpad, Libreoffice word, cals, gnumeric, osmo planner etc)

f. mover cursor to input field, press ctrl + space
the fcitx or scim ready tray will appear on the screen
fcitx on the top central, scim on lower right hand corner

g. select your input method
fcitx: mouse right click on any parts of the fcitx tray, select input method, mouse left click on the target input method on the drop down list
scim: mouse left click on the name of the default input method (just to the right of the SCIM sign on the left hand side of the SCIM tray), select either Chinese (simplified) or Chinese (traditional), select target input method on the pop-up list

h. move cursor to your application user input area, start typing using the keys specified by your input method

i. when the required word is found on the selection screen, select by typing the code number (1, 2, 3...) or mouse left click on the word

j. you can move up or down a page on the selection window by pressing + or -, page up or page down, as defined by the input method.

2. you like yong but unfortunately I ran into many funny issues in getting yong to run on fd. I will try again later and let you know.

3. I belief Google pinyin is closest to sogou pinyin and Gpy is included in both fcitx and scim pets

4. I have not repackaged fd before and I have to learn from scratch. I guess it would be much faster if you could try getting the fcitx or scim txzes working. However in case you really cannot make it, I will do something.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Sun 15 Jan 2017, 10:43    Post subject:  

re-testing
Back to top
View user's profile Send private message MSN Messenger 
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Tue 17 Jan 2017, 18:59    Post subject: Chinese Language pets/txzes
Subject description: yong txzes for fatdog64 7.1.0
 

** (Note: A more recent version of half-Chinese and Chinese language pets for fatdog64 710 is now available. Please see the posting dated Feb 11, 2017. icake)

I finally managed to run yong input method platform (小小输入法) on fatdog64 7.1.0 and 4 new txzes were created. I have only tested these on fatdog64 7.1.0 but they might be able to run on earlier fatdog64 systems:

a. yong input method platform (小小输入法): yong_2.4.0_fd64710-en-zh-10.1.0.txz (5.4 mb)

b. yong-terry hung (泰瑞版小小輸入法): yong_th_2016.11.5_fd64710-en-zh-10.1.0.txz (4.7 mb)

c. yong-terry hung and jerry jian (簡睿版小小輸入法): yong_thjj_2016.7.29_fd64710-en-zh-10.1.0.txz (5.0 mb)

d. yong- terry hung and thhui (改良版小小輸入法): yong_thth_2014.8.5_fd64710-en-zh-10.1.0.txz (6.0 mb)

these 4 txzes are now available for download:
https://goo.gl/QnrB0i
https://pan.baidu.com/s/1hsKAUiC

My only comment is trying to modify fatdog64 is very challenging and is not recommended for a normal user.

Last edited by icake on Sat 11 Feb 2017, 08:44; edited 1 time in total
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Wed 18 Jan 2017, 10:31    Post subject:  

Thanks icake

Must have been a lot of work! It is working correctly now on FD64-710.

For your interest, sogou pinyin is available on linux. I read that it becomes an input method option in fcitx. Maybe could be added to yong (not that it is needed!)

I will try these packages out with JustLighthouse too.

Thanks again
stemsee
Back to top
View user's profile Send private message MSN Messenger 
jamesbond

Joined: 26 Feb 2007
Posts: 3051
Location: The Blue Marble

PostPosted: Thu 19 Jan 2017, 03:54    Post subject:  

icake - thanks for supporting the Chinese language input in Fatdog.

You're saying that it is difficult to modify Fatdog and difficult to make it work. Can you please elaborate which part is difficult, why is it difficult, and whether there is any way we can make it easier for you to do what you do in the future?

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
TeX Dog

Joined: 06 Jul 2016
Posts: 341

PostPosted: Thu 19 Jan 2017, 13:22    Post subject:  

May just be language differences. I am in a kick to learn to cook Chinese ( really Taiwan style ) and most I find is mostly English with odd grammar and some important details still only in Chinese. I think the reverse would also occur.
I thought for years You (JB) was from Italy
Back to top
View user's profile Send private message 
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Thu 19 Jan 2017, 22:49    Post subject: Chinese language pets
Subject description: getting yong input method platform to run on fatdog64 7.1.0
 

With reference to the post by jamesbond earlier today, I am summarizing below the challenges I faced and the solutions I used in getting the yong input method platform to run on the fatdog64 7.1.0 system (fd).

Before I continue, may I make use of this opportunity to thank all the contributors to the Puppy community for their effort firstly in bringing the Puppy system to this world and secondly for their continuous effort to bring updates and improvements to create a better Puppy everyday.

The purposes of this summary are:
a. provide information for jamesbond and his team as feedback with the potential to making fd better

b. provide useful information for serious users of fd for modifying or work around with fd

c. provide documentation for myself as future references before I forgot

I want to emphasis that none of these descriptions are meant to be negative comments nor complaints about fd which is one of the most powerful and fast Puppy I have ever used.

Special notes: I realize that my experience with modifying the fd system is quite unique, relatively narrow and very specific. All I did was trying to get the Chinese input platforms (including fcitx, scim and yong) to run successfully on fd. So my prospective will likely be different compare to other modifications. Some of the issues below might also arise from the Chinese input platform programs themselves and have nothing to do with fd. So please be mindful in viewing these:

1. When a txz package was installed to fd, at the end of the installation process, a xdialog message saying that the package ***.txz was installed successfully was shown on the screen. It is absolutely normal and necessary to have such a message shown when everything went smoothly. However, during my work on fd, the same successful message was also shown without any warning when there were errors during the installation. These errors include:
a. when the /install/doinst.sh program file is not executable
b. when there are errors running the scripts inside /install/doinst.sh (e.g. spelling errors, if then logical errors, directory not found, file cannot be opened, program crashed - see 3 below for more details)

2. the default $LANG in fd is en_US.UTF-8 but for some unknown reasons, $LANG was changed to C during the installation of the yong.txz package. (I am not sure whether this was caused by fd or yong). Because yong depends on the value of $LANG to install different items to the system and so will lead to unexpected results.

My solution: disabled the testing of $LANG in yong.

3. for some unknown reasons, when the command "exec /usr/bin/gtk-query-immodules-2.0 --update-cache" was ran in fd, all the required information were correctly setup. But the program then crashed and exited abnormally
So if the command was ran by a line inside doinstal.sh, it will exit immediately and all scripts below this line will not be executed. Meanwhile the xdialog message saying that the package xxx.txz was installed successfully will still be shown
If the command was ran in a terminal, the terminal would flash once, then the terminal closed and disappeared (typical program crash)

My solution: move the command as the very last statement inside doinstal.sh and insert before that line (the 2nd last line) another command to run a 5 seconds delay restartwm script to regain control of the program throw right after the crash.

4. fd starts seamonkey using the command exec seamonkey -spot. However this caused yong Chinese input method platform unable to run in seamonkey.

My solution: replace exec seamonkey -spot with exec seamonkey.

5. the location of some key system files for fd are quite different compare to other Puppy systems:

a. font files are in /usr/share/fonts/X11/TTF instead of /usr/share/fonts/default/TTF
b. desktop menu fonts are defined in /etc/xdg/templates/_root_.jwmrc and /etc/xdg/templates/JWMRC instead of /root/.jwm/jwmrc-theme and /root/.jwm/themes/*-jwmrc
c. startup file xinitrc is in /etc/X11/xinitrc instead of /root/.xinitrc
d. a new wmexit program was used to exit from X by James Budiono 2012

All of the above caused a 15 minutes job for creating a new half-Chinese pet to become a 15 hours job for creating the first fd txz.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3051
Location: The Blue Marble

PostPosted: Fri 20 Jan 2017, 03:02    Post subject:  

Thank you icake for the feedback. I've written a very long reply and about to post it here, but then I thought it may be off-topic, so I'm PM-ing you instead. I'm happy for you to publish the content of that PM if you think it will help others.

@Tex Dog: You're not the only one Smile

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Fri 20 Jan 2017, 04:48    Post subject: Chinese language pets
Subject description: yong txzes for fatdog64 7.1.0 - reply from jamebond
 

Here is the full pm dated Jan 20 from jamesbond in response to my posting yesterday. I think it contains extremely useful information for serious fatdog64 users and jamesbond had already indicated that it can be published:
Thank you icake for the feedback.

icake wrote:
Quote:
I want to emphasis that none of these descriptions are meant to be negative comments nor complaints about fd...

Understood, thanks!

My comments below is meant to shed some lights on why things are as they are. I have re-paraphrased your original feedback to make it shorter; if my re-write is different from your original meaning please correct me.

___________________

1. Installing keeps showing "success" when installation actually fails (doinst.sh not executable and/or errs out).

RE: By the time doinst.sh is run, the package has already been installed (files expanded / copied). So it is too late to flag that installation fails even if doinst.sh fails.

Fatdog's package installation steps are basically:
a) tar -xf package-name.txz -C /
b) some administrative steps to record the installed files, etc.
c) sh /install/doinst.sh if doinst.sh exists
By the way doinst.sh does not need to be executable. It will still be run otherwise.

This behaviour is inherited from Slackware package management tool from which Fatdog's one is based on; it considers doinst.sh script optional and its failure non-fatal.

I cannot change the behaviour of this script because it is the building blocks used in higher-level package management tools (slapt-get and gslapt) (as I highlighted here: http://www.murga-linux.com/puppy/viewtopic.php?p=939770#939770), changing the behaviour may cause unwanted side effects.

I do agree that it makes it more difficult to debug install scripts.

My suggestion on how to create install script:
a) create a package without install scripts. Put it in /tmp.
b) launch a sandbox (run sandbox.sh from terminal).
c) inside the sandbox.sh, install the package from CLI (installpkg /tmp/pkgname.txz)
d) Then create the install script, test it as needed. Create your install script in /tmp also (this is one location shared between host and the sandbox).
e) If you need to start over, just exit from sandbox and restart from step b)
f) when done, you can re-create the package with the install script inside by copying the install script from /tmp to your package source folder
g) Test the final package inside sandbox again, make sure that it works.
h) You can launch a "desktop inside desktop" by typing "xwin" inside sandbox.


___________________


2. Default lang is UTF-8, but LANG changed to C in installation process.

RE: That's because /sbin/installpkg explicitly sets LANG=C before running. It's done to make certain operations "faster" and "predictable" (some operation with numbers will result with a "comma" or a "dot" to indicate thousand separators and decimals, and the script is hardcoded to handle only one of these).

This behaviour is inherited from Slackware package management tool from which Fatdog's one is based on.


___________________


3. "exec /usr/bin/gtk-query-immodules-2.0 --update-cache" crashed.
If the command was ran in a terminal, the terminal would flash once, then the terminal closed and disappeared (typical program crash)

RE: From my understanding, this is not a crash. For the terminal case, if you use "exec", the shell is replaced by gtk-query-immodules itself, and once it finishes the terminal as nothing else to run, so it quits. Try running the same command without the "exec" part, and see if that works?


___________________



4. fd starts seamonkey using the command exec seamonkey -spot.

RE: Yes, this is how we run network programs, seamonkey being the most obvious ones.
In my fcitx startup script, I actually run two instances of fctix:
Code:
Code:
# cat /etc/xdg/Startup/fcitx-xdg
#!/bin/dash
fcitx-autostart # start root
[ $(id -u) -eq 0 ] && run-as-spot fcitx-autostart # start spot


And I have two configurations, one for root, and one for spot.


___________________



5. the location of some key system files for fd are quite different compare to other Puppy systems.

RE: Yes, mainly for two reasons:
- The first reason is that we try not to patch things if possible, so the locations we use are the locations given in the original upstream source packages.
- The second reason is that Fatdog is multi-user, so we have two sets of configurations: one system-wide configuration (mostly reside in /etc) and one per-user configurations (in $HOME).

a. font files are in /usr/share/fonts/X11/TTF instead of /usr/share/fonts/default/TTF

RE: this is the default locations from Xorg

___________________

b. desktop menu fonts are defined in /etc/xdg/templates/_root_.jwmrc and /etc/xdg/templates/JWMRC instead of /root/.jwm/jwmrc-theme and /root/.jwm/themes/*-jwmrc

RE: I agree that this is not obvious. The reason why the config file is there is because we use fixmenus from technosaurus here: ("http://www.murga-linux.com/puppy/viewtopic.php?t=70804"), which uses a master configuration file in /etc/xdg/templates/JWMRC, and re-creates them for each user as needed.
The first 3 lines of the script has this:
Code:

Code:
[ ! -d ${HOME}/.jwm ] && mkdir ${HOME}/.jwm
[ -f ${HOME}/.jwm/JWMRC ] || cp /etc/xdg/templates/JWMRC ${HOME}/.jwm/JWMRC
. ${HOME}/.jwm/JWMRC



___________________

c. startup file xinitrc is in /etc/X11/xinitrc instead of /root/.xinitrc

RE: /root/.xinitrc is symlinked to /etc/X11/xinitrc, so if you edit /root/.xinitrd you actually edit /etc/X11/xinitrc automatically.

___________________

d. a new wmexit program was used to exit from X

RE: Yes, I consolidated all the various "exit from X" programs (wmexit, restartwm, etc etc) into one. I think later Woof-CE based pups are following similar approach.

___________________

Hope this helps.

If you feel this can help others, please feel free to publish it in your thread (or I can do that myself - let me know). The reason why I don't do that myself is because I feel that this long post may be off-topic.

Again, thank you for making the Chinese input works on Fatdog despite the difficulties you faced.

cheers!
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.

Thanks jamesbond for the quick and full reply. icake
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Sat 21 Jan 2017, 02:02    Post subject:  

No wonder!
Back to top
View user's profile Send private message MSN Messenger 
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Mon 23 Jan 2017, 08:59    Post subject: Chinese language pets
Subject description: quirky SlaQ 8.1.6 and quirky xerus 8.1.6 Chinese language pets
 

Barry Kauler has recently released 2 new Puppy systems:
quirky SlaQ x86_64 8.1.6 on Jan 9, 2017 and
quirky xerus x86_64 8.1.6 on Jan 13, 2017

Main features:
SlaQ 8.1.6 was built from Slackware 14.2 binary packages
Xerus 8.1.6 was built from Ubuntu 16.04 x86_64 binary packages

More information including background, announcement and release notes:
SlaQ 8.1.6: http://distro.ibiblio.org/quirky/quirky6/amd64/releases/slaq-8.1.6/release-slaq-8.1.6.htm
Xerus 8.1.6: http://distro.ibiblio.org/quirky/quirky6/amd64/releases/xerus-8.1.6/release-xerus64-8.1.6.htm

Download SlaQ 8.1.6:
http://distro.ibiblio.org/quirky/quirky6/amd64/releases/slaq-8.1.6/ or
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/quirky/quirky6/amd64/releases/slaq-8.1.6/

Download Xerus 8.1.6:
http://distro.ibiblio.org/quirky/quirky6/amd64/releases/xerus-8.1.6/ or
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/quirky/quirky6/amd64/releases/xerus-8.1.6/

I have created 6 half-Chinese language pets for slaq and xerus:
fcitx Chinese input platform: fcitx_4.2.7-en-zh-xenial-16.1.0.pet (24.6 mb)
scim Chinese input platform: scim_1.4.14-en-zh-xenial-16.1.0.pet (22.1 mb)
yong Chinese input platform:
yong3264_4.2.0-en-zh-xenial-16.1.0.pet (8.6 mb)
yong3264_th_2016.11.5-en-zh-xenial-16.1.0.pet (7.9 mb)
yong3264_thjj_2016.7.29-en-zh-xenial-16.1.0.pet (8.4 mb)
yong3264_thth_2014.8.5-en-zh-xenial-16.1.0.pet (9.5 mb)

Plus 2 Chinese language pets each for slaq and xerus:
xerus:
Simplified Chinese: xerus64-8.1.6-zhcn-16.1.0.pet (2.4 mb)
Traditional Chinese: xerus64-8.1.6-zhhk-16.1.0.pet (2.0 mb)

SlaQ:
Simplified Chinese: slaq64-8.1.6-zhcn-16.1.0.pet (2.4 mb)
Traditional Chinese: slaq64-8.1.6-zhhk-16.1.0.pet (2.0 mb)

To use:
(a) any 1 of the 6 half-Chinese language pets enables you to display and input Chinese in quirky SlaQ x86_64 8.1.6 or quirky xerus x86_64 8.1.6

(b) the Chinese language pets will give you Simplified Chinese or Traditional Chinese menus, icon labels for quirky SlaQ x86_64 8.1.6 or quirky xerus x86_64 8.1.6

All these half-Chinese and Chinese language pets are now available for download from the public sharing folders. Please see the first posting for download addresses.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Tue 31 Jan 2017, 07:34    Post subject:  

Hi icake

I am not able to get yong input method to work with google chrome/chromium browser on FatDog64 710! It works with tor/firefox ok.

Any pointers?

stemsee
Back to top
View user's profile Send private message MSN Messenger 
icake

Joined: 26 Jul 2012
Posts: 393

PostPosted: Wed 01 Feb 2017, 02:03    Post subject: Chinese language pets
Subject description: running yong input method platform in google-chrome under fatdog64 7.1.0
 

One way to get yong input method platform run on google-chrome under fatdog64 7.1.0 (fd):

1. In fd, go to /opt/google/chrome, open file google-chrome using geany

find this section at the end:

Code:
# Make sure that the profile directory specified in the environment, if any,
# overrides the default.
if [[ -n "$CHROME_USER_DATA_DIR" ]]; then
  # Note: exec -a below is a bashism.
  exec -a "$0" "$HERE/chrome"  \
    --user-data-dir="$CHROME_USER_DATA_DIR" "$@"
else
  exec -a "$0" "$HERE/chrome"  "$@"
fi


2. change the else part like this:

Code:
else
  #exec -a "$0" "$HERE/chrome"  "$@"
  exec -a "$0" "$HERE/chrome" "$@" --user-data-dir="$HOME"
fi


3. Save the file

4. run in terminal:
google-chrome-stable --no-sandbox

and yong should be available in google-chrome

Let me know if you can find a better way or if the above does not work for you.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Wed 01 Feb 2017, 03:42    Post subject:  

Thanks icake

Working now.

I had an idea that it was the isolation due to sandboxing. i also tested out this code using unshare. Needs further exploration, but works.
Code:
unshare google-chrome-stable --no-sandbox


stemsee
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 1957
Location: In The Way

PostPosted: Wed 01 Feb 2017, 15:49    Post subject:  

你奥,icake

When I have yong installed and I still want to make the system chinese aswell do I still need to install a half-chinese pet?

Or must I uninstall yong and thn install a half chinese pet and then the chinese system pet?

With yong installed and then installing half-cinese pet and the chinese system pet after restart X everything is chinese, but yong no longer works and neither does fcitx. Also after subsequent restart, the system changes with only some menu items and desktop icons retain chinese text.

In this case what steps must be taken so that only yong is installed and full cinese system, but no fcitx or sscim?
隙隙

stemsee
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 26 of 28 [419 Posts]   Goto page: Previous 1, 2, 3, ..., 24, 25, 26, 27, 28 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1074s ][ Queries: 13 (0.0359s) ][ GZIP on ]